diff options
author | Erich Eckner <git@eckner.net> | 2021-04-14 09:37:31 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-04-14 09:37:37 +0200 |
commit | ac9917c5a9c0df982ab2c1935991634259924d38 (patch) | |
tree | 4b4fca9d9f455b41daaba790aeecdfaba2416e21 | |
parent | 6ac325b85dbf9add8d7626b42555701327c4abf5 (diff) | |
download | hardlinkedBackups-ac9917c5a9c0df982ab2c1935991634259924d38.tar.xz |
last-backups: cleanup
-rwxr-xr-x | last-backups.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/last-backups.in b/last-backups.in index ac7f01a..4a4c7e3 100755 --- a/last-backups.in +++ b/last-backups.in @@ -57,7 +57,18 @@ do ) [ "${lbu}" == "" ] && lbu="1970_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\$##"))" + namen[${#namen[@]}]=$( + basename $( + echo "${dest}" \ + | sed ' + s#/\('"${recognSubdirRegex}"'\)$#_\1# + ' \ + | sed ' + s#/rsync$## + s#/duplicity$## + ' + ) + ) if [ -f "/tmp/${backupID}.pid" ] && pgrep '(^|/|\s)backup\S*$' | grep -qxF "$(cat "/tmp/${backupID}.pid")"; then laeuft='_laeuft' else |