diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-12-09 13:25:59 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-12-09 13:25:59 +0100 |
commit | 4ba19ba18deb919646cc0c120e3b0d90e53c2667 (patch) | |
tree | eab6d356572db40d2c5f1abab553bd3d711963b2 /contrib | |
parent | 3dd05b6727a410c77420c7f366ed6a76fde601da (diff) | |
download | pianobar-windows-4ba19ba18deb919646cc0c120e3b0d90e53c2667.tar.gz pianobar-windows-4ba19ba18deb919646cc0c120e3b0d90e53c2667.tar.bz2 pianobar-windows-4ba19ba18deb919646cc0c120e3b0d90e53c2667.zip |
Add multi.sh eventcmd
Suggested by #191, slightly improved.
Diffstat (limited to 'contrib')
-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" + |