diff options
author | Kerkko Pelttari <kerk.pelt@gmail.com> | 2020-04-07 10:31:26 +0300 |
---|---|---|
committer | Kerkko Pelttari <kerk.pelt@gmail.com> | 2020-04-07 10:43:17 +0300 |
commit | f47e574c875c521244cdb30f271714d4bf20294d (patch) | |
tree | 731680e8601a7fe31f784874e6241ff510d745fa /scripts/vim-patch.sh | |
parent | d26a66a2b310100bac47a57da8b92978a22cb785 (diff) | |
download | rneovim-f47e574c875c521244cdb30f271714d4bf20294d.tar.gz rneovim-f47e574c875c521244cdb30f271714d4bf20294d.tar.bz2 rneovim-f47e574c875c521244cdb30f271714d4bf20294d.zip |
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>
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-x | scripts/vim-patch.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index ba0e7f62dd..e844d2951c 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -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 |