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
|
|
|
|
2022-02-01 09:30:02 -05:00
|
|
|
if ! command -v curl >/dev/null 2>&1; then
|
|
|
|
|
printf "This script depends on curl.\n"
|
2021-05-10 08:51:22 -04:00
|
|
|
exit 1
|
2021-04-25 21:42:59 -04:00
|
|
|
fi
|
|
|
|
|
|
2022-08-30 11:40:40 -04:00
|
|
|
ZELDA="https://archive.org/download/cirno_actually_plays_zelda_in_terminal/zelda.wav"
|
2021-04-25 21:42:59 -04:00
|
|
|
|
2022-08-30 11:40:40 -04:00
|
|
|
if which aplay >/dev/null 2>&1; then curl -L "$ZELDA" | aplay # ALSA
|
|
|
|
|
elif ls /dev/dsp >/dev/null 2>&1; then curl -L "$ZELDA" >/dev/dsp # OSS
|
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
|