2021-04-25 21:48:00 -04:00
|
|
|
#!/bin/sh -x
|
2021-05-10 08:51:22 -04:00
|
|
|
set -e
|
2021-04-25 21:42:59 -04:00
|
|
|
|
|
|
|
|
if ! which curl >/dev/null 2>&1; then
|
|
|
|
|
printf "1n574ll curl, 5700p1d!\n"
|
2021-05-10 08:51:22 -04:00
|
|
|
exit 1
|
2021-04-25 21:42:59 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
ZELDA="http://www.trinity.moe/zelda.wav"
|
|
|
|
|
|
2021-04-25 21:48:00 -04:00
|
|
|
if which aplay >/dev/null 2>&1; then curl "$ZELDA" | aplay
|
|
|
|
|
elif ls /dev/dsp >/dev/null 2>&1; then curl "$ZELDA" >/dev/dsp
|
2021-04-25 21:42:59 -04:00
|
|
|
else
|
|
|
|
|
printf "Unknown sound device. Sorry!\n"
|
2021-05-10 08:51:22 -04:00
|
|
|
exit 1
|
2021-04-25 21:42:59 -04:00
|
|
|
fi
|
|
|
|
|
|
2021-05-10 08:51:22 -04:00
|
|
|
exit 0
|