]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
fix find parameter
authorBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jun 2026 17:52:20 +0000 (19:52 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jun 2026 17:52:20 +0000 (19:52 +0200)
src/backup

index e9f58289db16cc8bc9a63b4682d431e63b6b452f..3066bbf2b38cde551b1706e6b9b4992040437c36 100755 (executable)
@@ -41,7 +41,7 @@ rotate_history()
 
        [ -f "$history_file" ] || return 0
 
-       history_lines=$(wc -l "$history_file")
+       history_lines=$(wc --lines "$history_file")
        echo "ℹ️  INFO: $history_file has $history_lines lines"
        [ "$history_lines" -ge 100 ] \
                && savelog -c 10 -l "$history_file" \
@@ -225,7 +225,7 @@ cleanup_backups()
        local backup_count=$3
        local backup_counted=
 
-       backup_counted=$(find "$backup_path" -max-depth 1 -type d \
+       backup_counted=$(find "$backup_path" -maxdepth 1 -type d \
                | grep "_$backup_name" \
                | sort \
                | wc --lines)