From 54ec2aca9927f4db9425a5f8f77e11e2b40f646a Mon Sep 17 00:00:00 2001 From: Christian Stadelmann Date: Fri, 2 Jan 2015 22:47:28 +0100 Subject: [PATCH 1/2] fix: ignore case in bash version string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently on some systems `bash --version` reports `GNU bash, Version 4[…]` which will fail the test. --- cipherscan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cipherscan b/cipherscan index 4bf4e5b..b52199d 100755 --- a/cipherscan +++ b/cipherscan @@ -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 'version 4')" == "" ]; then +if [ "$(bash --version |grep -i 'version 4')" == "" ]; then echo "Bash version 4 is required to run cipherscan." echo "Please upgrade your version of bash (ex: brew install bash)." exit 1 From 9ecc3f7164ad77d62c469b8c509ad33ff263d1fa Mon Sep 17 00:00:00 2001 From: Christian Stadelmann Date: Mon, 12 Jan 2015 16:46:18 +0100 Subject: [PATCH 2/2] New bash version info test using $BASH_VERSINFO --- cipherscan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cipherscan b/cipherscan index b52199d..46bb981 100755 --- a/cipherscan +++ b/cipherscan @@ -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