summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-01 15:25:00 +0200
committerErich Eckner <git@eckner.net>2016-04-01 15:25:00 +0200
commit930ced0b96e4b0ac32eadf1037c1c3e78e3988ec (patch)
tree72a4710fc7cbea0c460caeaa820d7b3213e0fcc3
parent61998f2eaabadd4fa531d97e9a42373ff9bc6fbc (diff)
downloadhardlinkedBackups-930ced0b96e4b0ac32eadf1037c1c3e78e3988ec.tar.xz
lastBackups warnt nun auch bei leeren Backupsv1.0.1
-rwxr-xr-xlastBackups6
1 files changed, 5 insertions, 1 deletions
diff --git a/lastBackups b/lastBackups
index 7a03c11..83fcbed 100755
--- a/lastBackups
+++ b/lastBackups
@@ -28,7 +28,11 @@ 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\$##"))"
- [ ${delta} -gt ${outdatedLimit} ] && veraltet[${#veraltet[@]}]="VERALTET!" || veraltet[${#veraltet[@]}]=""
+ [ ! "$(ls -A ${dest}/${lbu})" ] &&
+ veraltet[${#veraltet[@]}]="LEER!" ||
+ [ ${delta} -gt ${outdatedLimit} ] && \
+ veraltet[${#veraltet[@]}]="VERALTET!" || \
+ veraltet[${#veraltet[@]}]=""
daten[${#daten[@]}]="${lbu}"
done