diff options
-rwxr-xr-x | contrib/eventcmd-examples/multi.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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" + |