New bash version info test using $BASH_VERSINFO

This commit is contained in:
Christian Stadelmann 2015-01-12 16:46:18 +01:00
parent 54ec2aca99
commit 9ecc3f7164
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
fi
# cipherscan requires bash4, which doesn't come by default in OSX
if [ "$(bash --version |grep -i 'version 4')" == "" ]; then
if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
echo "Bash version 4 is required to run cipherscan."
echo "Please upgrade your version of bash (ex: brew install bash)."
exit 1