From 6d3b12919396c7b1b8e888425872306d87d7b062 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 10 May 2021 08:51:22 -0400 Subject: [PATCH] dying considered scary --- homepage/zeldb.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homepage/zeldb.sh b/homepage/zeldb.sh index ee245e3..725e2be 100755 --- a/homepage/zeldb.sh +++ b/homepage/zeldb.sh @@ -1,10 +1,9 @@ #!/bin/sh -x - -die() { return 1 || exit 1; } +set -e if ! which curl >/dev/null 2>&1; then printf "1n574ll curl, 5700p1d!\n" - die + exit 1 fi 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 else printf "Unknown sound device. Sorry!\n" - die + exit 1 fi -return 0 || exit 0 +exit 0