2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-12-25 12:13:41 +01:00

move bash4 detection as early as possible in the script to permit logic later on

This commit is contained in:
Richard Soderberg 2015-09-05 00:03:55 -07:00
parent 3f3e22b09a
commit 0728751208

View File

@ -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)"