diff options
author | Erich Eckner <git@eckner.net> | 2016-04-01 15:25:00 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-01 15:25:00 +0200 |
commit | 930ced0b96e4b0ac32eadf1037c1c3e78e3988ec (patch) | |
tree | 72a4710fc7cbea0c460caeaa820d7b3213e0fcc3 | |
parent | 61998f2eaabadd4fa531d97e9a42373ff9bc6fbc (diff) | |
download | hardlinkedBackups-1.0.1.tar.xz |
lastBackups warnt nun auch bei leeren Backupsv1.0.1
-rwxr-xr-x | lastBackups | 6 |
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 |