Skip to content

Commit

Permalink
tools/install: Recommend updating Bash version to 4 or higher
Browse files Browse the repository at this point in the history
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
  • Loading branch information
nntoan and akinomyoga committed Jan 15, 2022
1 parent 94d45b3 commit c391560
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ if [ -z "${BASH_VERSION-}" ]; then
fi

if [[ ! ${BASH_VERSINFO[0]-} ]] || ((BASH_VERSINFO[0] < 3 || BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 2)); then
printf "Error: Bash 3.2 required for Oh My Bash.\n"
printf "Error: Upgrade Bash and try again.\n"
printf "Error: Bash 3.2 required for Oh My Bash.\n" >&2
printf "Error: Upgrade Bash and try again.\n" >&2
return 2 &>/dev/null || exit 2
elif ((BASH_VERSINFO[0] < 4)); then
printf "Warning: Bash >=4 is no longer required for Oh My Bash but is cool to have ;)\n" >&2
printf "Warning: Why don't you upgrade your Bash to 4 or higher?\n" >&2
fi

_omb_install_print_usage() {
Expand Down

0 comments on commit c391560

Please sign in to comment.