summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-04-14 09:40:47 +0200
committerErich Eckner <git@eckner.net>2021-04-14 09:40:47 +0200
commitaf752198a95824266ccb3dd2dd49c3248897122b (patch)
tree1c58b4c2084aafa8530c8e9490f185b57eb5e3c9
parentac9917c5a9c0df982ab2c1935991634259924d38 (diff)
downloadhardlinkedBackups-af752198a95824266ccb3dd2dd49c3248897122b.tar.xz
last-backups: apply recognSubdirRegex multiple times if necessary
-rwxr-xr-xlast-backups.in10
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
'
)
)