1
0

dying considered scary

This commit is contained in:
Deven Blake 2021-05-10 08:51:22 -04:00
parent a4cd11abcb
commit 6d3b129193

View File

@ -1,10 +1,9 @@
#!/bin/sh -x #!/bin/sh -x
set -e
die() { return 1 || exit 1; }
if ! which curl >/dev/null 2>&1; then if ! which curl >/dev/null 2>&1; then
printf "1n574ll curl, 5700p1d!\n" printf "1n574ll curl, 5700p1d!\n"
die exit 1
fi fi
ZELDA="http://www.trinity.moe/zelda.wav" ZELDA="http://www.trinity.moe/zelda.wav"
@ -13,7 +12,7 @@ if which aplay >/dev/null 2>&1; then curl "$ZELDA" | aplay
elif ls /dev/dsp >/dev/null 2>&1; then curl "$ZELDA" >/dev/dsp elif ls /dev/dsp >/dev/null 2>&1; then curl "$ZELDA" >/dev/dsp
else else
printf "Unknown sound device. Sorry!\n" printf "Unknown sound device. Sorry!\n"
die exit 1
fi fi
return 0 || exit 0 exit 0