pbuilder-dist: Implemented architecture choosing for amd64.

This commit is contained in:
Siegfried-Angel Gevatter Pujals (RainCT) 2007-08-07 18:25:49 +02:00
commit 254ce498a1
2 changed files with 21 additions and 8 deletions

View File

@ -18,31 +18,43 @@
BASE_DIR="$HOME/pbuilder"
ARCH=`dpkg-architecture | grep "DEB_HOST_ARCH=" | cut -f2 -d '='`
if [ ! -z `echo \`basename $0\` | grep '-'` ]
then
if [ $# -lt 1 ]
then
echo "Insufficient number of arguments."
echo "Usage: $0 <operation>"
echo "Usage: $0 "$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"<operation>"
exit 1
fi
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
OPERATION=$1
shift 1
else
if [ $# -lt 2 ]
then
echo "Insufficient number of arguments."
echo "Usage: $0 <distribution> <operation>"
echo "Usage: $0 <distribution> ""$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )""<operation>"
exit 1
fi
DISTRIBUTION=$1
OPERATION=$2
shift 2
shift 1
fi
if [ $1 = "i386" ] || [ $1 = "amd64" ]
then
if [ $ARCH = "amd64" ]
then
BINARCH=$1
else
echo "Warning: Architecture switching is not supported on your system; ignoring argument."
fi
shift 1
fi
OPERATION=$1
case $DISTRIBUTION in
#warty|hoary|breezy)
@ -98,5 +110,6 @@ fi
sudo pbuilder $OPERATION \
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
--distribution $DISTRIBUTION \
$( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \
--buildresult $BASE_DIR/$DISTRIBUTION_result \
--othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@

View File

@ -19,12 +19,12 @@ setup(name='ubuntu-dev-tools',
'check-symbols',
'get-branches',
'pbuilder-dist',
'update-maintainer',
'update-maintainer',
'dch-repeat',
'mk-sbuild-lv',
'pull-debian-debdiff',
'what-patch',
'suspicious-source',
'suspicious-source',
],
)