From 95090da408d106e2193d7d9f2db18520155c0191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A6=C3=BE=27n=20Lasseter?= Date: Mon, 15 Feb 2016 10:36:10 +0000 Subject: Added Teardown to manyplayer --- manyplayer | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manyplayer b/manyplayer index c0bd18f..d4dfa17 100755 --- a/manyplayer +++ b/manyplayer @@ -70,6 +70,14 @@ function setup { echo -n $thelast > ${MANYPLAYER_DIR}/last } +function teardown { + if [ ! -d ${MANYPLAYER_DIR} ] ; then + echo "Manyplayer has not been set up for this directory (${MANYPLAYER_DIR})." + exit 1 + fi + rm -rf ${MANYPLAYER_DIR} +} + function set_cmd { echo -n $1 > ${MANYPLAYER_DIR}/cmd } @@ -86,6 +94,7 @@ Usage: same Watch the last episode again tell Print the last filename manyplayer setup Setup manyplayer for this directory + manyplayer teardown Teardown manyplayer for this directory manyplayer cmd Set the command for this directory manyplayer pos Set the position for this directory manyplayer help Show this pretty useless help @@ -109,6 +118,8 @@ elif [ "x$exe" == "xmanyplayer" ] ; then else setup $2 $3 fi + elif [ "x$1" == "xteardown" ] ; then + teardown elif [ "x$1" == "xcmd" ] ; then check if [ "x$2" == "x" ] ; then -- cgit v1.2.1