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
39f042
if [ "$centos_ver" -ge 9 ] ; then
f49232
  ruby -v | grep -q '3.'
f49232
  ret_val=$?
f49232
elif [ "$centos_ver" = "8" ] ; then
Pablo Greco d0fb29
  ruby -v | grep -q '2.5'
Pablo Greco d0fb29
  ret_val=$?
Pablo Greco d0fb29
elif [ "$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