bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_ruby/20-ruby-version-test.sh

Sahil Muthoo 6ce9d3
#!/bin/sh
Sahil Muthoo 6ce9d3
# Author: Nikhil Lanjewar <nikhil@lanjewar.com>
Sahil Muthoo 6ce9d3
# Author: Sahil Muthoo <sahilm@thoughtworks.com>
Sahil Muthoo 6ce9d3
# Author: Sahil Aggarwal <sahilagg@gmail.com>
Sahil Muthoo 6ce9d3
# Author: Saager Mhatre <saager.mhatre@gmail.com>
Christoph Galuschka 37e507
#	  Christoph Galuschka <christoph.galuschka@chello.at>
Sahil Muthoo 6ce9d3
Christoph Galuschka 37e507
t_Log "Running $0 - Check version of ruby."
Christoph Galuschka 37e507
v=$( ruby -v )
Christoph Galuschka 37e507
if (t_GetPkgRel basesystem | grep -q el5)
Christoph Galuschka 37e507
  then
Christoph Galuschka 37e507
  ruby -v | grep -q '1.8.5'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
else
Christoph Galuschka 37e507
  ruby -v | grep -q '1.8.7'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
fi
Christoph Galuschka 37e507
Christoph Galuschka 37e507
t_CheckExitStatus $ret_val
Sahil Muthoo 6ce9d3