diff --git a/.config/shell/bin/sleep-until b/.config/shell/bin/sleep-until index 8955a5e..f0ff26b 100755 --- a/.config/shell/bin/sleep-until +++ b/.config/shell/bin/sleep-until @@ -8,8 +8,8 @@ if [ -n "$1" ] && date --date="$*" > /dev/null 2>&1; then # Calculate the time in seconds to sleep by subtracting the future time from the current time SLEEP_TIME="$(( $(date -f - +%s- <<< "$*"$'\nnow') 0 ))" if [ "$SLEEP_TIME" -gt 0 ]; then - echo "Sleeping until: $(date --date="$*") (${SLEEP_TIME}s)" if ! "$DRY"; then + echo "Sleeping until: $(date --date="$*") (${SLEEP_TIME}s)" sleep "$SLEEP_TIME" else echo "$SLEEP_TIME"