aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-02 00:20:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-02 00:24:29 +1300
commit770338d431564d261a63d256db54949031efeff0 (patch)
treefdc315ca75b899dfc1bc516737dfb66cf971db9d /games
parentAdd issue with dr(6df) (diff)
downloaddotfiles-770338d431564d261a63d256db54949031efeff0.tar.gz
dotfiles-770338d431564d261a63d256db54949031efeff0.zip
Separate var assigns in dr(6df) by line
NetBSD and FreeBSD sh(1) doesn't seem to evaluate the assignments in order, so in this change, the "d" variable doesn't get assigned correctly. This makes sense as I don't think an evaluation order is specified anywhere. It's clearer anyway.
Diffstat (limited to 'games')
-rwxr-xr-xgames/dr4
1 files changed, 3 insertions, 1 deletions
diff --git a/games/dr b/games/dr
index a236dc1e..e1db163d 100755
--- a/games/dr
+++ b/games/dr
@@ -5,7 +5,9 @@
[ "$#" -eq 1 ] || exit 2
# Arcane string chopping
-n=1 a=0 nd=${1%+*} d=${nd#*d}
+n=1 a=0
+nd=${1%+*}
+d=${nd#*d}
[ "${nd%d*}" != "" ] && n=${nd%d*}
[ "${1#*+}" = "$1" ] || a=${1#*+}