diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 17:36:34 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 19:31:19 +0100 |
commit | 37bf4bc96cb4d67b9e22177e77c6d99283354e66 (patch) | |
tree | 8aeb87fee156427eba55d303ec412262516ebb81 /infra | |
parent | f7724dce721e5c2c04e9e2b73e15effa5a675a55 (diff) |
Mirroring: dgit-mirror-rsync copes with invocation via relative pathname
Diffstat (limited to 'infra')
-rwxr-xr-x | infra/dgit-mirror-rsync | 9 |
1 files changed, 8 insertions, 1 deletions
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 () { |