From: Siraaj Khandkar Date: Sun, 5 Jun 2022 20:43:51 +0000 (-0400) Subject: Fallback on sleep if snore isn't available X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=cf93be102119f6ffc0584388f7cce9f2da5e116f;p=khome.git Fallback on sleep if snore isn't available --- diff --git a/home/bin/alarm b/home/bin/alarm index 472e7f9..fd0b055 100755 --- a/home/bin/alarm +++ b/home/bin/alarm @@ -7,7 +7,14 @@ case "$1" seconds="$1" esac -snore "$seconds" +if which snore +then + _sleep=snore; +else + _sleep=sleep; +fi + +"$_sleep" "$seconds" printf "!!! TIMES UP !!!\n"