X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fschroot%2Ffiles%2Fsetup-all-dchroots;h=c6efbb17e85e7072e0bd019861dd0eaef61b0092;hb=6632ba2a54e021d9e09089197f392d5e6e279d02;hp=7ff84b40cce3844a42c25817fd75ab931de5284f;hpb=49f7c90c52341e0a0666e578f6ca09c7d2d5d55b;p=mirror%2Fdsa-puppet.git diff --git a/modules/schroot/files/setup-all-dchroots b/modules/schroot/files/setup-all-dchroots index 7ff84b40c..c6efbb17e 100755 --- a/modules/schroot/files/setup-all-dchroots +++ b/modules/schroot/files/setup-all-dchroots @@ -70,8 +70,10 @@ cat << EOF usage: $0 [] [buildd] OPTIONS: + -a limit to ARCH -c write config only -h this help + -s limit to SUITE EOF } @@ -83,9 +85,14 @@ EOF # parse options ########## EXTRAARGS="" -while getopts "cu" OPTION +limitarch="" +limitsuite="" +while getopts "cha:s:" OPTION do case $OPTION in + a) + limitarch="$OPTARG" + ;; c) EXTRAARGS="$EXTRAARGS -c" ;; @@ -93,6 +100,9 @@ do usage exit 0 ;; + s) + limitsuite="$OPTARG" + ;; *) usage >&2 exit 1 @@ -132,7 +142,7 @@ fi # get list of archs based on dpkg architecture ########## DPKGARCH=$(dpkg --print-architecture) -archs="DPKGARCH" +archs="$DPKGARCH" case "$DPKGARCH" in amd64) archs="$archs i386" @@ -162,7 +172,9 @@ esac err=0 for a in $archs; do + [ "$limitarch" != "" ] && [ "$limitarch" != "$a" ] && continue for s in `get_suites "$a"`; do + [ "$limitsuite" != "" ] && [ "$limitsuite" != "$s" ] && continue if ! do_one "$a" "$s"; then err=1 echo >&2