aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_logout
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-09-25 11:47:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-09-25 11:47:16 +1200
commitcc0621613736de966061ff63bb7dd9648b46e651 (patch)
tree26653bed348a912b05bbcbbeaee4cb38045cba0a /bash/bash_logout
parentUpgrade plugins (diff)
downloaddotfiles-cc0621613736de966061ff63bb7dd9648b46e651.tar.gz
dotfiles-cc0621613736de966061ff63bb7dd9648b46e651.zip
Simplify Bash version checks a bit more
Diffstat (limited to 'bash/bash_logout')
-rw-r--r--bash/bash_logout8
1 files changed, 5 insertions, 3 deletions
diff --git a/bash/bash_logout b/bash/bash_logout
index ae6ab015..e5855f36 100644
--- a/bash/bash_logout
+++ b/bash/bash_logout
@@ -1,8 +1,10 @@
-# Ensure we're using at least version 2.05
+# 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).
if ! [ -n "$BASH_VERSINFO" ] ; then
return
-elif ((BASH_VERSINFO[0] == 2)) && \
- ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) ; then
+elif ((BASH_VERSINFO[0] == 2 && \
+ 10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) ; then
return
fi