-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump minimal Bash version from 2.05 to 3.0
This is required by the use of `<<<` to compose the `S2_*` and `ax_*` arrays. I could use here-docs `<<` instead, but there's another reason to bump this version: the oldest supported version in the official Docker image for Bash is 3.0. So getting an old 2.05 and put automated tests for it would be a deviation for the procedure already in place for all the other versions. Version 2.05 is from 2001 and 3.0 is from 2004. We're still supporting a very old version anyway. Now every supported Bash version is properly tested in the CI.
- Loading branch information
1 parent
a85e6b3
commit d0c6254
Showing
3 changed files
with
6 additions
and
6 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
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
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,10 +1,10 @@ | ||
#!/bin/bash | ||
# txt2regex.sh - Regular Expressions "wizard", all in bash2 builtins | ||
# txt2regex.sh - Regular Expressions "wizard" made with Bash builtins | ||
# | ||
# Website : https://aurelio.net/projects/txt2regex/ | ||
# Author : Aurelio Jargas ([email protected]) | ||
# License : GPL | ||
# Requires: bash >= 2.05 | ||
# Requires: bash >= 3.0 | ||
# | ||
# shellcheck disable=SC1117,SC2034 | ||
# SC1117 because it was obsoleted in shellcheck >0.5 | ||
|
@@ -96,11 +96,11 @@ printError() { | |
} | ||
|
||
case "$BASH_VERSION" in | ||
2.0[5-9]* | 2.[1-9]* | [3-9].*) | ||
[3-9].*) | ||
: # do nothing | ||
;; | ||
*) | ||
printError 'Bash version >=2.05 required, but you have %s\n' "$BASH_VERSION" | ||
printError 'Bash version >=3.0 required, but you have %s\n' "$BASH_VERSION" | ||
;; | ||
esac | ||
|
||
|