Skip to content

Commit

Permalink
Require Bash >= 4.0
Browse files Browse the repository at this point in the history
The Bash on MacOS X is ancient 3.2;
trying to support it will limit development of this script.
  • Loading branch information
oh2fih authored Mar 31, 2024
1 parent 7342c6c commit d277a18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions securitytxt-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ required_command() {

UNMET=0

if ((BASH_VERSINFO[0] < 4)); then
echo -e "\033[0;31mThis script requires bash >= 4.0\033[0m" >&2
echo -e "\033[0;31mYour bash ${BASH_VERSION} is unsupported.\033[0m" >&2
((UNMET=UNMET+1))
fi

required_command "sed"
required_command "awk"
required_command "grep"
Expand Down

0 comments on commit d277a18

Please sign in to comment.