X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=infra%2Fdgit-mirror-rsync;h=5b54d16cc0f9a1cdbf0be5251d1943b5f5d3d535;hp=e73d9a5bcf982fd109902973a4f310f843bf7c67;hb=f7724dce721e5c2c04e9e2b73e15effa5a675a55;hpb=7de3df349f56e05723b3eeb7972aaea4d9fc1000 diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index e73d9a5b..5b54d16c 100755 --- a/infra/dgit-mirror-rsync +++ b/infra/dgit-mirror-rsync @@ -30,6 +30,12 @@ case "$DGIT_DRS_DEBUG" in *) set -x ;; esac +fail () { + echo >&2 "dgit-mirror-rsync: $*"; exit 127 +} + +if [ $# -lt 2 ]; then fail "too few arguments"; fi + self=$0 distrodir=$1; shift action=$1; shift @@ -54,10 +60,6 @@ rsyncssh='ssh -o batchmode=yes' cd $repos queue=_mirror-queue -fail () { - echo >&2 "dgit-mirror-rsync: $*"; exit 127 -} - case "$remoterepos" in *:/*|/*) ;; '') fail "remoterepos config not set" ;;