sleep-until: add sleep time output to dry

This commit is contained in:
PowerUser64 2023-04-07 04:40:24 -07:00
parent 9615a15126
commit c03af6f32e

View file

@ -11,6 +11,8 @@ if [ -n "$1" ] && date --date="$*" > /dev/null 2>&1; then
echo "Sleeping until: $(date --date="$*") (${SLEEP_TIME}s)" echo "Sleeping until: $(date --date="$*") (${SLEEP_TIME}s)"
if ! "$DRY"; then if ! "$DRY"; then
sleep "$SLEEP_TIME" sleep "$SLEEP_TIME"
else
echo "$SLEEP_TIME"
fi fi
else else
echo "Error: input date '$*' is in the past" >&2 echo "Error: input date '$*' is in the past" >&2