From: Andrew Ruthven Date: Thu, 26 Jun 2008 23:19:40 +0000 (+1200) Subject: Abstract out the mpc command - it turns out that --no-status isn't in the Etch version. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e38df4f5b1b9f9dab262dea5d079413e96bba430;p=mpd-tools.git Abstract out the mpc command - it turns out that --no-status isn't in the Etch version. --- diff --git a/mpc-rotate b/mpc-rotate index 7da0556..efd7b5b 100755 --- a/mpc-rotate +++ b/mpc-rotate @@ -17,9 +17,13 @@ save_state() { echo "PLAYLIST=$1" > $state } +mpc_cmd() { + mpc $* > /dev/null +} + #PLAYLIST=children -mpc --no-status stop +mpc_cmd stop if [ "x$PLAYLIST" == "x" ] then @@ -48,10 +52,10 @@ else then play_general else - mpc --no-status clear - mpc --no-status load $next_list - mpc --no-status shuffle - mpc --no-status play + mpc_cmd clear + mpc_cmd load $next_list + mpc_cmd shuffle + mpc_cmd play fi save_state $next_list;