rendered paste bodyIndex: pls-handler.sh
===================================================================
--- pls-handler.sh (revision 5007)
+++ pls-handler.sh (working copy)
@@ -1,4 +1,6 @@
#!/bin/sh
+[[ $# -ne 1 ]] && echo "$0 takes 1 argument" && exit 1
+[[ ! -f $1 ]] && echo "Argument ($1) needs to be a file" && exit 2
mpc clear
grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add
mpc play
Index: m3u-handler.sh
===================================================================
--- m3u-handler.sh (revision 5007)
+++ m3u-handler.sh (working copy)
@@ -1,4 +1,6 @@
#!/bin/sh
+[[ $# -ne 1 ]] && echo "$0 takes 1 argument" && exit 1
+[[ ! -f $1 ]] && echo "Argument ($1) needs to be a file" && exit 2
mpc clear
cat $1 | mpc add
mpc play