diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-02 00:20:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-02 00:24:29 +1300 |
commit | 770338d431564d261a63d256db54949031efeff0 (patch) | |
tree | fdc315ca75b899dfc1bc516737dfb66cf971db9d /games/dr | |
parent | Add issue with dr(6df) (diff) | |
download | dotfiles-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/dr')
-rwxr-xr-x | games/dr | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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#*+} |