From 37bf4bc96cb4d67b9e22177e77c6d99283354e66 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 11 Jul 2015 17:36:34 +0100 Subject: Mirroring: dgit-mirror-rsync copes with invocation via relative pathname --- infra/dgit-mirror-rsync | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'infra') diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index 5b54d16..9afd39f 100755 --- a/infra/dgit-mirror-rsync +++ b/infra/dgit-mirror-rsync @@ -37,6 +37,13 @@ fail () { if [ $# -lt 2 ]; then fail "too few arguments"; fi self=$0 + +case "$self" in +/*) ;; +*/*) self="$PWD/$self" ;; +*) ;; +esac + distrodir=$1; shift action=$1; shift package=$1 @@ -79,7 +86,7 @@ reinvoke () { exec \ "$@" \ - "$0" "$distrodir" "reinvoke$newaction" "$package" + "$self" "$distrodir" "reinvoke$newaction" "$package" } check-package-mirrorable () { -- cgit v1.2.3