# 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
}
case "$MODE" in
buildd)
mkdir -p /srv/buildd/unpack
- if ! $SILENT setup-dchroot $extraargs -f -a "$a" -D -d '/srv/buildd/unpack' -K "$s"
+ if ! $SILENT setup-dchroot $EXTRAARGS -f -a "$a" -D -d '/srv/buildd/unpack' -K "$s"
then
return 1
fi
;;
porterbox)
- if ! $SILENT setup-dchroot $extraargs -f -a "$a" "$s"
+ if ! $SILENT setup-dchroot $EXTRAARGS -f -a "$a" "$s"
then
return 1
fi
usage: $0 [<options>] [buildd]
OPTIONS:
+ -a <ARCH> limit to ARCH
-c write config only
-h this help
+ -s <SUITE> limit to SUITE
EOF
}
-extraargs=""
-while getopts "cu" OPTION
+##########
+# "main"
+##########
+
+
+# parse options
+##########
+EXTRAARGS=""
+limitarch=""
+limitsuite=""
+while getopts "cha:s:" OPTION
do
case $OPTION in
+ a)
+ limitarch="$OPTARG"
+ ;;
c)
- extraargs="$extraargs -c"
+ EXTRAARGS="$EXTRAARGS -c"
;;
h)
usage
exit 0
;;
+ s)
+ limitsuite="$OPTARG"
+ ;;
*)
usage >&2
exit 1
done
shift $(($OPTIND - 1))
+# parse arguments
+##########
if [ "$#" -gt 1 ]; then
usage >&2
exit 1
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)
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