DPKGARCH=$(dpkg --print-architecture)
UNAMEARCH=$(uname -m)
+get_suites() {
+ case "$1" in
+ amd64|i386|armel|armhf)
+ echo "sid buster stretch jessie"
+ ;;
+ *)
+ echo "sid buster stretch"
+ ;;
+ esac
+}
+
+do_one() {
+ local a="$1"; shift
+ local s="$1"; shift
+
+ case "$MODE" in
+ buildd)
+ mkdir -p /srv/buildd/unpack
+ if ! $SILENT setup-dchroot $extraargs -f -a "$a" $extra -D -d '/srv/buildd/unpack' -K "$s"
+ then
+ return 1
+ fi
+ ;;
+ porterbox)
+ if ! $SILENT setup-dchroot $extraargs -f -a "$a" $extra "$s"
+ then
+ return 1
+ fi
+ ;;
+ *)
+ echo >&2 "Invalid mode $MODE"
+ exit 1
+ esac
+ return 0
+}
+
usage()
{
cat << EOF
SILENT="chronic"
fi
-get_suites() {
- case "$1" in
- amd64|i386|armel|armhf)
- echo "sid buster stretch jessie"
- ;;
- *)
- echo "sid buster stretch"
- ;;
- esac
-}
extra=""
err=0
-do_one() {
- local a="$1"; shift
- local s="$1"; shift
-
- case "$MODE" in
- buildd)
- mkdir -p /srv/buildd/unpack
- if ! $SILENT setup-dchroot $extraargs -f -a "$a" $extra -D -d '/srv/buildd/unpack' -K "$s"
- then
- return 1
- fi
- ;;
- porterbox)
- if ! $SILENT setup-dchroot $extraargs -f -a "$a" $extra "$s"
- then
- return 1
- fi
- ;;
- *)
- echo >&2 "Invalid mode $MODE"
- exit 1
- esac
- return 0
-}
-
for a in $archs; do
for s in `get_suites "$a"`; do
if ! do_one "$a" "$s"; then