X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fschroot%2Ffiles%2Fsetup-all-dchroots;h=2bf8a5454cfa2ea9fabdde03340fe0a771145940;hb=11a0f9c15ed03348c1c68b154cc58bdc19b742c5;hp=76280816b25347c23f69631a471c5d66344679b8;hpb=b08064c800fe8d944cf19e0239ec3e62e7889b1a;p=mirror%2Fdsa-puppet.git diff --git a/modules/schroot/files/setup-all-dchroots b/modules/schroot/files/setup-all-dchroots index 76280816b..2bf8a5454 100755 --- a/modules/schroot/files/setup-all-dchroots +++ b/modules/schroot/files/setup-all-dchroots @@ -28,16 +28,16 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -DPKGARCH=$(dpkg --print-architecture) -UNAMEARCH=$(uname -m) - 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 } @@ -73,15 +73,29 @@ cat << EOF usage: $0 [] [buildd] OPTIONS: + -a limit to ARCH -c write config only -h this help + -s limit to SUITE EOF } +########## +# "main" +########## + + +# 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" ;; @@ -89,6 +103,9 @@ do usage exit 0 ;; + s) + limitsuite="$OPTARG" + ;; *) usage >&2 exit 1 @@ -97,6 +114,8 @@ do done shift $(($OPTIND - 1)) +# parse arguments +########## if [ "$#" -gt 1 ]; then usage >&2 exit 1 @@ -115,13 +134,17 @@ else MODE=porterbox fi +# figure out whether to be verbose or not +########## if [ -t 0 ] ; then SILENT="" else SILENT="chronic" fi - +# get list of archs based on dpkg architecture +########## +DPKGARCH=$(dpkg --print-architecture) archs="$DPKGARCH" case "$DPKGARCH" in amd64) @@ -152,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