1
0
Files
src/homepage/zeldb.sh

20 lines
367 B
Bash
Raw Normal View History

2021-04-25 21:48:00 -04:00
#!/bin/sh -x
2021-04-25 21:42:59 -04:00
2021-04-25 21:48:00 -04:00
die() { return 1 || exit 1; }
2021-04-25 21:42:59 -04:00
if ! which curl >/dev/null 2>&1; then
printf "1n574ll curl, 5700p1d!\n"
die
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"
die
fi
return 0 || exit 0