20 lines
341 B
Bash
Executable File
20 lines
341 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ $# -ne 1 ] ; then
|
|
echo "Usage: soundboard name, where name is the name of a soundboard you want to load."
|
|
exit 1
|
|
fi
|
|
|
|
if ! [ -d sounds/$1 ] ; then
|
|
echo "soundboard $1 not found."
|
|
exit 1
|
|
fi
|
|
|
|
while [ 1 -gt 0 ] ; do
|
|
read -sn1 key
|
|
if [ -f sounds/$1/$key.ogg ] ; then
|
|
play -qV0 sounds/$1/$key.ogg&
|
|
fi
|
|
done
|
|
exit 0
|