-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for Bash 4.3+ and exit if requirements aren't met
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
# -*- mode: sh -*- | ||
# Bach Testing Framework, https://bach.sh | ||
# Bach Unit Testing Framework, https://bach.sh | ||
# Copyright (C) 2019 Chai Feng <[email protected]> | ||
# | ||
# Bach Testing Framework is dual licensed under: | ||
# Bach Unit Testing Framework is dual licensed under: | ||
# - GNU General Public License v3.0 | ||
# - Mozilla Public License 2.0 | ||
set -euo pipefail | ||
IFS='.' read -r __major __minor _ <<< "${BASH_VERSION:-0.0.0}" | ||
if [ "$__major" -lt 4 ] || { [ "$__major" -eq 4 ] && [ "$__minor" -lt 3 ]; }; then | ||
echo "Error: Bach Unit Testing Framework requires Bash version 4.3 or higher. Your current version is ${BASH_VERSION:-unknown}." >&2 | ||
exit 1 | ||
fi | ||
shopt -s expand_aliases | ||
|
||
builtin export BACH_COLOR="${BACH_COLOR:-auto}" | ||
|