diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 16:49:59 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 19:31:19 +0100 |
commit | f7724dce721e5c2c04e9e2b73e15effa5a675a55 (patch) | |
tree | bb0217d2ea403c3f66999751745db95358d341ed /infra/dgit-mirror-rsync | |
parent | 8ee9e3edb66cb7af5aab96e44a2cfa0ff84b529a (diff) |
Mirroring: Check number of arguments to dgit-mirror-rsync
Diffstat (limited to 'infra/dgit-mirror-rsync')
-rwxr-xr-x | infra/dgit-mirror-rsync | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index e73d9a5..5b54d16 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" ;; |