aboutsummaryrefslogtreecommitdiff
path: root/bin/han.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-28 00:13:06 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-28 00:13:06 +1300
commit8215cba30d96b421ff0b434b5900fa60af5e1a4b (patch)
treee0a800d9f03580d8daf7524f40cafd8fe9e28061 /bin/han.bash
parentMerge branch 'release/v4.0.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-9141c7990036facd3f09847e8e468be9b707c145.tar.gz (sig)
dotfiles-9141c7990036facd3f09847e8e468be9b707c145.zip
Merge branch 'release/v4.1.0'v4.1.0
* release/v4.1.0: Bump VERSION Correct typo in stub vimrc Remove some vestigial Bash 2.05 guards/comments Break up some long lines Two-space sentences in VimL comments Two-space sentences in shell comments Break up some long lines Fix long lines in manual pages Two-space sentences in manual pages Adjust sentence spacing of README.md Remove highlight double-quote VimL comment strings
Diffstat (limited to 'bin/han.bash')
-rw-r--r--bin/han.bash10
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/han.bash b/bin/han.bash
index 3c4f6637..6ab0b3e7 100644
--- a/bin/han.bash
+++ b/bin/han.bash
@@ -1,14 +1,10 @@
# Abstract calls to Bash help vs man(1)
self=han
-# Ensure we're using at least version 2.05. Weird arithmetic syntax needed here
-# due to leading zeroes and trailing letters in some 2.x version numbers (e.g.
-# 2.05a).
+# Ensure we're using at least version 3.0
# shellcheck disable=SC2128
-[ -n "$BASH_VERSINFO" ] || exit
-((BASH_VERSINFO[0] == 2)) &&
- ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) &&
- exit
+[ -n "$BASH_VERSINFO" ] || exit # Check version array exists (>=2.0)
+((BASH_VERSINFO[0] >= 3)) || exit # Check actual major version number
# Figure out the options with which we can call help; Bash >=4.0 has an -m
# option which prints the help output in a man-page like format