]> arthur.barton.de Git - backup-script.git/commitdiff
backup-audit: Suppress error message when no older generation exists
authorAlexander Barton <alex@barton.de>
Fri, 8 Jul 2016 08:03:05 +0000 (10:03 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 8 Jul 2016 08:03:05 +0000 (10:03 +0200)
bin/backup-audit

index 2a3b99736fc8214829d3024f7f5c735bd4c6f4f4..0cf89e4440c14ba70913e36bd599499c8a46edf1 100755 (executable)
@@ -119,7 +119,7 @@ HandleSystem() {
 
        # Search previous generation without errors
        local previous_d=""
-       for d in $(ls -1dt $target/[0-9]*-[0-9]*); do
+       for d in $(ls -1dt $target/[0-9]*-[0-9]* 2>/dev/null); do
                [[ -d "$d" && -r "$d/.stamp" ]] || return 0
 
                declare -i code=-1