diff --git a/scripts/hooks.sh b/scripts/hooks.sh index 3a2c6f2..845ead9 100644 --- a/scripts/hooks.sh +++ b/scripts/hooks.sh @@ -47,7 +47,13 @@ __resh_collect() { local __RESH_PID="$$" # current pid elif [ -n "$BASH_VERSION" ]; then # assume Bash - local __RESH_PID="$BASHPID" # current pid + 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) diff --git a/scripts/install.sh b/scripts/install.sh index 5b18327..0c46a80 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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."