summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-01-23 21:18:15 +0000
committerNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-01-23 21:18:15 +0000
commitb528c1c6187d19a4d5f2b8458bea9a755b3ddbbf (patch)
treeb4751d98e00e2ac6338b5cffb2cccf7fc96e043a
parent3f51e43077f33de50712fb4488082abb23469687 (diff)
Changed manyplayer start position (on setup) to some fancier logic
-rwxr-xr-xmanyplayer7
1 files changed, 2 insertions, 5 deletions
diff --git a/manyplayer b/manyplayer
index 6f55535..c0bd18f 100755
--- a/manyplayer
+++ b/manyplayer
@@ -66,11 +66,8 @@ function setup {
local name=${guess/$1/!}
echo -n $name > ${MANYPLAYER_DIR}/filename
- if [ "x$2" == "x" ] ; then
- echo -n 00 > ${MANYPLAYER_DIR}/last
- else
- echo -n $2 > ${MANYPLAYER_DIR}/last
- fi
+ local thelast=$(printf %02d $((10#$1 - 1)))
+ echo -n $thelast > ${MANYPLAYER_DIR}/last
}
function set_cmd {