sleep-until: add sleep time output to dry
This commit is contained in:
parent
9615a15126
commit
c03af6f32e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue