From: Bastian Dehn Date: Sun, 25 May 2025 05:36:30 +0000 (+0200) Subject: change backup with long parameter X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=8a9c396625bfbbb6af290b286528bdca837301f8;p=simple-backup.git change backup with long parameter --- diff --git a/backup b/backup index 0c87d81..337f212 100755 --- a/backup +++ b/backup @@ -123,7 +123,7 @@ backup_remotes() local machine= for machine in $machines; do echo "ℹ️ INFO: create direcotry $backup_path/$machine" - mkdir -p $backup_path/$machine \ + mkdir --parents $backup_path/$machine \ || errlog "could not create directory $backup_path/$machine" \ || return $? @@ -218,9 +218,9 @@ is_backup_old() local diff=$(( ($(date --date="$backup_date" +%s) - $(date +%s)) / 86400 )) case "$backup_typ" in - "day") [ $diff -ge 0 ] || return 1 ;; - "week") [ $diff -ge -6 ] || return 1 ;; - "month") [ "$backup_month" == "$now_month" ] || return 1 ;; + "day") [ $diff -ge 0 ] || return $? ;; + "week") [ $diff -ge -6 ] || return $? ;; + "month") [ "$backup_month" == "$now_month" ] || return $? ;; *) return 0;; esac }