Fallback on sleep if snore isn't available
authorSiraaj Khandkar <siraaj@khandkar.net>
Sun, 5 Jun 2022 20:43:51 +0000 (16:43 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 5 Jun 2022 20:43:51 +0000 (16:43 -0400)
home/bin/alarm

index 472e7f9..fd0b055 100755 (executable)
@@ -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"
 
This page took 0.022516 seconds and 4 git commands to generate.