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."
a4f4f3
a4f4f3
if [ "$centos_ver" = "7" ] ; then
a4f4f3
  ruby -v | grep -q '2.0'
a4f4f3
  ret_val=$?
a4f4f3
elif [ "$centos_ver" = "6" ] ; then
Christoph Galuschka 9b13b5
  ruby -v | grep -q '1.8.7'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
else
Christoph Galuschka 9b13b5
  ruby -v | grep -q '1.8.5'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
fi
Christoph Galuschka 37e507
Christoph Galuschka 37e507
t_CheckExitStatus $ret_val
Sahil Muthoo 6ce9d3