X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=local%2Fbackup%2Fduplicity-remove;fp=local%2Fbackup%2Fduplicity-remove;h=5143736d2d22f678e7557ee2f3630b184cc5775e;hb=82a43a9c95892ecfa8bad1a72b490ad0bf60cd3b;hp=0000000000000000000000000000000000000000;hpb=0d705d8e2a919ee40866307aa3e18b1a5c4e7583;p=lhc%2Fateliers.git diff --git a/local/backup/duplicity-remove b/local/backup/duplicity-remove new file mode 100755 index 0000000..5143736 --- /dev/null +++ b/local/backup/duplicity-remove @@ -0,0 +1,18 @@ +#!/bin/sh -eu +# SYNTAX: $data_dir $find_options -- $duplicity_options +${TRACE:+set -x} + +test "$(id -u)" = "$(id -u backup)" + +data_dir=$1; shift +find_options= +while [ $# -gt 0 ] + do case $1 in + (--) shift; break;; + (*) find_options="$find_options $1"; shift;; + esac + done + +find ~backup/data/"$data_dir" -mindepth 1 $find_options -type d \ + -printf '--name\0%P\0file://%p\0' | +xargs -0rn3 ${TRACE:+-t} ~backup/bin/duplicity "$@"