#! /bin/bash # this is sourced from pbuilder packages to process the optional parameters. # empty some vars. DPKG_BUILDPACKAGEOPT="" . /etc/pbuilderrc . /usr/lib/pbuilder/pbuilder-modules # the default is to add a PID in the buildplace specified in the config file. BASEBUILDPLACE="$BUILDPLACE" BUILDPLACE="$BUILDPLACE/$$" while [ -n "$1" ]; do case "$1" in --basetgz) BASETGZ=$(readlink -f "$2"); shift; shift; ;; --buildplace) BUILDPLACE=$(readlink -f "$2"); shift; shift; ;; --mirror) MIRRORSITE="$2"; shift; shift; ;; --nonusmirror) NONUSMIRRORSITE="$2"; shift; shift; ;; --othermirror) OTHERMIRROR="$3"; shift; shift; ;; --http-proxy) export http_proxy="$2"; shift; shift; ;; --distribution) DISTRIBUTION="$2"; shift; shift; ;; --buildresult) BUILDRESULT=$(readlink -f "$2"); shift; shift; ;; --removepackages) REMOVEPACKAGES="$2"; shift; shift; ;; --configfile) . "$2"; shift; shift; ;; --extrapackages) EXTRAPACKAGES="$2"; shift; shift; ;; --hookdir) HOOKDIR="$2"; shift; shift; ;; --debemail) DEBEMAIL="$2"; shift; shift; ;; --help) showhelp ;; --*) echo "Error: Unknown option [$1] was specified " >&2 exit 1; ;; *) break; ;; esac done BUILDPLACE=${BUILDPLACE?"Build root directory is not defined"} if [ -z "$DEBEMAIL" ]; then DEBEMAIL="nobody@nowhere" fi # line from kobras@debian.org if [ "$DEBIAN_FRONTEND" = "noninteractive" ]; then exec < /dev/null fi