Skip to content

Commit

Permalink
Check bash version
Browse files Browse the repository at this point in the history
MacOS ships an ancient bash version.
  • Loading branch information
pjcj committed Dec 29, 2023
1 parent c6f4258 commit fb979bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/dc
Expand Up @@ -7,7 +7,13 @@
# The latest version of this software should be available from my homepage:
# http://www.pjcj.net

set -euo pipefail
if ((BASH_VERSINFO[0] < 5)); then
echo "❌ bash version $BASH_VERSION is too old. Please install v5 or higher."
exit 1
fi

set -eEuo pipefail
shopt -s inherit_errexit

script=$(basename "$0")
readl=readlink
Expand Down

0 comments on commit fb979bd

Please sign in to comment.