bash3.2 fix, warn people but support bash3.2

pull/58/head v2.4.11-rc4
Simon Let 6 years ago
parent 08323d7c18
commit d2cc85a2fb
  1. 6
      scripts/hooks.sh
  2. 2
      scripts/install.sh

@ -47,7 +47,13 @@ __resh_collect() {
local __RESH_PID="$$" # current pid
elif [ -n "$BASH_VERSION" ]; then
# assume Bash
if [ "${BASH_VERSINFO[0]}" -ge "4" ]; then
# $BASHPID is only available in bash4+
# $$ is fairly similar so it should not be an issue
local __RESH_PID="$BASHPID" # current pid
else
local __RESH_PID="$$" # current pid
fi
fi
# time
local __RESH_TZ_BEFORE; __RESH_TZ_BEFORE=$(date +%z)

@ -27,7 +27,7 @@ elif [ "$bash_version_major" -eq 4 ] && [ "$bash_version_minor" -lt 3 ]; then
fi
if [ "$bash_too_old" = true ]; then
echo " * Bash version: $bash_version - UNSUPPORTED!"
echo " * Bash version: $bash_version"
if [ "$login_shell" = bash ]; then
echo " > Your bash version is old."
echo " > Bash is also your login shell."

Loading…
Cancel
Save