diff options
author | Erich Eckner <git@eckner.net> | 2021-04-14 09:40:47 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-04-14 09:40:47 +0200 |
commit | af752198a95824266ccb3dd2dd49c3248897122b (patch) | |
tree | 1c58b4c2084aafa8530c8e9490f185b57eb5e3c9 | |
parent | ac9917c5a9c0df982ab2c1935991634259924d38 (diff) | |
download | hardlinkedBackups-af752198a95824266ccb3dd2dd49c3248897122b.tar.xz |
last-backups: apply recognSubdirRegex multiple times if necessary
-rwxr-xr-x | last-backups.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/last-backups.in b/last-backups.in index 4a4c7e3..61117d0 100755 --- a/last-backups.in +++ b/last-backups.in @@ -59,13 +59,15 @@ do delta=$[$(date +%s) - $(date -d $(echo ${lbu} | sed "s/_//g") +%s)] namen[${#namen[@]}]=$( basename $( - echo "${dest}" \ - | sed ' - s#/\('"${recognSubdirRegex}"'\)$#_\1# - ' \ + printf '%s\n' "${dest}" \ | sed ' s#/rsync$## s#/duplicity$## + ' \ + | sed ' + :a + s#/\('"${recognSubdirRegex}"'\)$#_\1# + ta ' ) ) |