From 4ba19ba18deb919646cc0c120e3b0d90e53c2667 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 9 Dec 2011 13:25:59 +0100 Subject: Add multi.sh eventcmd Suggested by #191, slightly improved. --- contrib/eventcmd-examples/multi.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 contrib/eventcmd-examples/multi.sh (limited to 'contrib/eventcmd-examples') diff --git a/contrib/eventcmd-examples/multi.sh b/contrib/eventcmd-examples/multi.sh new file mode 100755 index 0000000..a6eb016 --- /dev/null +++ b/contrib/eventcmd-examples/multi.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Executes all scripts located in ~/.config/pianobar/eventcmd.d/ as if they +# were called by pianobar directly + +STDIN=`mktemp` +cat >> $STDIN + +for F in ~/.config/pianobar/eventcmd.d/*; do + if [ -x "$F" ]; then + "$F" $@ < "$STDIN" + fi +done + +rm "$STDIN" + -- cgit v1.2.3