From eca327168ba1959055374ffa0314dbaa33afb32f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 16 Aug 2018 10:08:52 +0200 Subject: [PATCH] setup-all-dchroots: Support rebuilding just one arch/suite --- modules/schroot/files/setup-all-dchroots | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/schroot/files/setup-all-dchroots b/modules/schroot/files/setup-all-dchroots index 7ff84b40c..ec98163d5 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 @@ -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 -- 2.20.1