summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlastBackups.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/lastBackups.in b/lastBackups.in
index ea6040a..6366058 100755
--- a/lastBackups.in
+++ b/lastBackups.in
@@ -30,11 +30,15 @@ do
[ "${lbu}" == "" ] && lbu="2000_01_01"
delta=$[$(date +%s) - $(date -d $(echo ${lbu} | sed "s/_//g") +%s)]
namen[${#namen[@]}]="$(basename $(echo ${dest} | sed "s#/\(${recognSubdirRegex}\)\$#_\1#" | sed "s#/rsync\$##; s#/duplicity\$##"))"
- [ ! "$(ls -A ${dest}/${lbu})" ] &&
- veraltet[${#veraltet[@]}]="LEER!" ||
- [ ${delta} -gt ${outdatedLimit} ] && \
- veraltet[${#veraltet[@]}]="VERALTET!" || \
- veraltet[${#veraltet[@]}]=""
+ if [ ! "$(ls -A ${dest}/${lbu})" ]
+ then
+ veraltet[${#veraltet[@]}]="LEER!"
+ elif [ ${delta} -gt ${outdatedLimit} ]
+ then
+ veraltet[${#veraltet[@]}]="VERALTET!"
+ else
+ veraltet[${#veraltet[@]}]=""
+ fi
daten[${#daten[@]}]="${lbu}"
done