fix: bash date comparison (#12)

This commit is contained in:
Luca Saalfeld
2025-02-05 14:22:10 +01:00
committed by GitHub
parent 3f0305c741
commit 388afe69b7
+1 -1
View File
@@ -308,7 +308,7 @@ function display_modpack_overwrite_help() {
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 +%Y-%m-%d) -gt $(date +%Y-%m-%d -d "$last_update + 3 days") ]]; then if [[ "$(date +%Y-%m-%d)" > "$(date +%Y-%m-%d -d "$last_update + 3 days")" ]]; then
return return
fi fi
else else