#!/bin/sh # ideas for this stolen from # http://archives.eyrie.org/software/devel/git-pbuilder set -e if [ -z "$DIST" ]; then DIST="sid" fi; # no sense having a backport for sid if [ "$DIST" == "sid" ]; then BACKPORT=""; fi; if [ -n "$ARCH" ]; then ARCH="_$ARCH"; else ARCH="" fi; if [ -n "$BACKPORT" ]; then BACKPORT="_bp"; else BACKPORT=""; fi; OPTIONS="${OPTIONS:-}" if [ "$DIST" = "etch" ]; then OPTIONS="$OPTIONS --debian-etch-workaround" fi; if [ -z "$BUILDRESULT" ]; then BUILDRESULT=../ fi; pdebuild --buildresult "$BUILDRESULT" \ --debbuildopts "-i\.git -I.git $*" \ ${PDEBUILDOPTS} \ -- --basepath ~/pbuilder/base_"${DIST}${BACKPORT}${ARCH}" ${OPTIONS} "$@"