Shell: Fix shell version on bash 3

This commit is contained in:
Dylan Araps 2017-01-25 00:49:14 +11:00
parent 32c4b00bfd
commit bade83d5d5

View file

@ -525,7 +525,7 @@ get_shell() {
esac
if [[ "$shell_version" == "on" ]]; then
case "${SHELL##*/}" in
case "${shell_name:=${SHELL##*/}}" in
"bash") shell+="${BASH_VERSION/-*}" ;;
"sh" | "ash" | "dash") ;;
@ -537,7 +537,7 @@ get_shell() {
*)
shell+="$("$SHELL" --version 2>&1)"
shell="${shell/ ${SHELL##*/}}"
shell="${shell/ "${shell_name}"}"
;;
esac