Apply suggestions from code review

Improve error message for unsupported bash version, use double square bracket operator

Co-Authored-By: Daniel Hahler <github@thequod.de>
This commit is contained in:
Kerkko Pelttari 2020-04-07 10:31:26 +03:00
parent d26a66a2b3
commit f47e574c87

View File

@ -6,8 +6,8 @@ set -u
set -p
# Ensure that the user has a bash that supports -A
if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
echo "Update your bash version to one that supports -A syntax (>3)"
if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
echo "This script requires bash version 3 or later (you have ${BASH_VERSION})." >&2
exit 1
fi