From d26a66a2b310100bac47a57da8b92978a22cb785 Mon Sep 17 00:00:00 2001 From: Kerkko Pelttari Date: Thu, 2 Apr 2020 17:56:14 +0300 Subject: [PATCH] Check for bash version in vim-patch.sh --- scripts/vim-patch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index f9726e8a87..ba0e7f62dd 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -5,6 +5,12 @@ set -u # Use privileged mode, which e.g. skips using CDPATH. 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)" + exit 1 +fi + readonly NVIM_SOURCE_DIR="${NVIM_SOURCE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" readonly VIM_SOURCE_DIR_DEFAULT="${NVIM_SOURCE_DIR}/.vim-src" readonly VIM_SOURCE_DIR="${VIM_SOURCE_DIR:-${VIM_SOURCE_DIR_DEFAULT}}"