X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fschroot%2Ffiles%2Fsetup-all-dchroots;h=2bf8a5454cfa2ea9fabdde03340fe0a771145940;hb=a7016fcb7d27ba652c9bbcf800021000c2c17420;hp=a5e6094225796d7f94d3b4bf7ad26598b7aadd16;hpb=48dbf6b29a7089c34a32f3fd812510af7d8312d9;p=mirror%2Fdsa-puppet.git diff --git a/modules/schroot/files/setup-all-dchroots b/modules/schroot/files/setup-all-dchroots index a5e609422..2bf8a5454 100755 --- a/modules/schroot/files/setup-all-dchroots +++ b/modules/schroot/files/setup-all-dchroots @@ -28,15 +28,16 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -DPKGARCH=$(dpkg --print-architecture) - get_suites() { case "$1" in amd64|i386|armel|armhf) - echo "sid buster stretch jessie" + echo "sid bullseye buster stretch jessie" + ;; + mips) + echo "buster stretch" ;; *) - echo "sid buster stretch" + echo "sid bullseye buster stretch" ;; esac } @@ -72,8 +73,10 @@ cat << EOF usage: $0 [] [buildd] OPTIONS: + -a limit to ARCH -c write config only -h this help + -s limit to SUITE EOF } @@ -85,9 +88,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" ;; @@ -95,6 +103,9 @@ do usage exit 0 ;; + s) + limitsuite="$OPTARG" + ;; *) usage >&2 exit 1 @@ -131,9 +142,9 @@ else SILENT="chronic" fi - -# get list of archs based on DPKGARCH +# get list of archs based on dpkg architecture ########## +DPKGARCH=$(dpkg --print-architecture) archs="$DPKGARCH" case "$DPKGARCH" in amd64) @@ -164,7 +175,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