Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions updateDependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
NON_INTERACTIVE_OPTION=$1
DEPENDENCY=$2

# Check if Bash version is 4 or higher
if (( BASH_VERSINFO[0] < 4 )); then
echo "Error: Bash version 4 or higher is required." >&2
echo "If you are on a mac, you can switch to a modern bash e.g. with 'brew install bash' and ensure it's in your PATH." >&2
# n.b. if it's not in your PATH, you can do so e.g. by defining "export PATH="/opt/homebrew/bin:$PATH" in your ~/.zshrc
exit 1
fi

check_installed() {
if ! type "$1" > /dev/null; then
echo "Please ensure you have $1 installed."
Expand Down