sleep-until: exit with non-zero code on failure

This commit is contained in:
PowerUser64 2022-07-14 19:07:42 -07:00
parent e5ccbd3ad6
commit f662ac2456

View file

@ -9,7 +9,9 @@ if [ -n "$1" ] && date --date="$*" > /dev/null 2>&1; then
sleep "$SLEEP_TIME" sleep "$SLEEP_TIME"
else else
echo "Sadly, you cannot sleep to a time in the past" echo "Sadly, you cannot sleep to a time in the past"
exit 1
fi fi
else else
echo "Please input a valid date" echo "Please input a valid date"
exit 1
fi fi