diff --git a/cipherscan b/cipherscan index 21d52c6..b80d347 100755 --- a/cipherscan +++ b/cipherscan @@ -10,6 +10,14 @@ DOBENCHMARK=0 BENCHMARKITER=30 + +# cipherscan requires bash4, which doesn't come by default in OSX +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 +fi + DIRNAMEPATH=$(dirname "$0") REALPATH="$DIRNAMEPATH" # make sure this doesn't error out when readlink -f isn't available (OSX) @@ -25,13 +33,6 @@ if ! [[ $OPENSSLBINHELP =~ -connect ]]; then exit 1 fi -# cipherscan requires bash4, which doesn't come by default in OSX -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 -fi - # test that timeout or gtimeout (darwin) are present TIMEOUTBIN="$(which timeout)"