fix: modify date syntax to enhance compatibility with alternate coreutils implementations, such as [uutils](https://github.com/uutils/coreutils) (#29)
This commit is contained in:
committed by
GitHub
parent
a8e94c19fb
commit
9c73be1cb7
@@ -377,7 +377,7 @@ EOF
|
|||||||
function check_for_updates() {
|
function check_for_updates() {
|
||||||
if [[ -f "$LAST_CHECKED_UPDATE_FILE" ]]; then
|
if [[ -f "$LAST_CHECKED_UPDATE_FILE" ]]; then
|
||||||
last_update=$(cat "$LAST_CHECKED_UPDATE_FILE")
|
last_update=$(cat "$LAST_CHECKED_UPDATE_FILE")
|
||||||
if [[ "$(date +%s)" -lt "$(date +%s -d "$last_update + 1 hour")" ]]; then
|
if [[ "$(date +%s)" -lt $(("$(date +%s -d "$last_update")" + 3600)) ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user