summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-02-15 10:36:10 +0000
committerNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-02-15 10:36:10 +0000
commit95090da408d106e2193d7d9f2db18520155c0191 (patch)
tree403ec04fd83347f8ccd387e8fc32bd1228be6c5f
parentb528c1c6187d19a4d5f2b8458bea9a755b3ddbbf (diff)
Added Teardown to manyplayer
-rwxr-xr-xmanyplayer11
1 files changed, 11 insertions, 0 deletions
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 <guess> Setup manyplayer for this directory
+ manyplayer teardown Teardown manyplayer for this directory
manyplayer cmd <cmd> Set the command for this directory
manyplayer pos <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