diff options
Diffstat (limited to 'play.sh')
-rwxr-xr-x | play.sh | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -0,0 +1,42 @@ +pid=0; + +echo "== keys ==" +echo "- f - nutty" +echo "- j - with love" +echo "- n - graduate degree" +echo "- v - young folks" +echo "- h - sandwich" +echo +echo "--" +echo "-- by using this you agree that any thing --" +echo "-- made by it or its contents is not owned by you --" +echo "--" +echo + + +aplay backing.wav >/dev/null 2>&1 & + +while read -n 1 c; do + +if [ $c == "f" ]; then + f="nutty.wav" +elif [ $c == "j" ]; then + f="withlove.wav" +elif [ $c == "n" ]; then + f="graduatedegree.wav" +elif [ $c == "v" ]; then + f="youngfolks.wav" +elif [ $c == "h" ]; then + f="sandwich.wav" +else + continue +fi + +if [ $pid -gt 0 ]; then + kill -9 $pid 2>/dev/null & +fi + +aplay $f >/dev/null 2>&1 & +pid=$! + +done |