Compare commits
No commits in common. "main" and "1" have entirely different histories.
@ -11,11 +11,10 @@ seconds_until() {
|
||||
# Function to sleep until a given datetime
|
||||
sleep_until() {
|
||||
target="$1"
|
||||
extended_format=$(date -d "$target" "+%c") # Format datetime into extended format
|
||||
seconds=$(seconds_until "$target")
|
||||
if [ $seconds -gt 0 ]; then
|
||||
if [ "$verbose" == true ]; then
|
||||
echo "Sleeping until $extended_format..."
|
||||
echo "Sleeping until $target..."
|
||||
fi
|
||||
sleep $seconds
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user