summaryrefslogtreecommitdiff
path: root/manyplayer
diff options
context:
space:
mode:
Diffstat (limited to 'manyplayer')
-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 {