diff options
author | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2016-01-23 21:18:15 +0000 |
---|---|---|
committer | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2016-01-23 21:18:15 +0000 |
commit | b528c1c6187d19a4d5f2b8458bea9a755b3ddbbf (patch) | |
tree | b4751d98e00e2ac6338b5cffb2cccf7fc96e043a | |
parent | 3f51e43077f33de50712fb4488082abb23469687 (diff) |
Changed manyplayer start position (on setup) to some fancier logic
-rwxr-xr-x | manyplayer | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 { |