3 if [ ! -f "$hostfile" ]; then
6 if [ ! -f "$hostfile" ]; then
7 echo "Could not find the hostfile for this machine."
11 grunty=$(grep -i gruntose.blurgh <"$hostfile")
12 if [ ! -z "$grunty" ]; then
13 VOXDIR=/z/walrus/media/sounds
14 #hmmm: generalize the above.
15 FILE_LIST=$(find $VOXDIR -type f)
16 echo "file list is $FILE_LIST"
17 LINES=$(find $VOXDIR -type f | wc -l)
18 #echo "lines is $LINES"
19 LESS_CHANCE=$(expr $LINES \\* 4)
20 #echo "less chance is $LESS_CHANCE"
22 while [ -z "$TO_PLAY" ]; do
23 TO_PLAY=$(find $VOXDIR -type f | random $LESS_CHANCE | tail -1)
24 #echo "to play is $TO_PLAY"
28 bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh $TO_PLAY