sleep-until: exit with non-zero code on failure
This commit is contained in:
parent
e5ccbd3ad6
commit
f662ac2456
1 changed files with 2 additions and 0 deletions
|
@ -9,7 +9,9 @@ if [ -n "$1" ] && date --date="$*" > /dev/null 2>&1; then
|
|||
sleep "$SLEEP_TIME"
|
||||
else
|
||||
echo "Sadly, you cannot sleep to a time in the past"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Please input a valid date"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue