2002-07-11 22:01:44 +00:00
|
|
|
#!/bin/sh -e
|
1999-11-11 16:10:37 -01:00
|
|
|
|
2000-06-11 13:12:56 +00:00
|
|
|
# Script to build one arch
|
1999-11-11 16:10:37 -01:00
|
|
|
|
|
|
|
. CONF.sh
|
2000-06-11 13:12:56 +00:00
|
|
|
|
2002-07-11 22:01:44 +00:00
|
|
|
if [ -n "$1" ] ; then
|
|
|
|
export ARCH=$1
|
|
|
|
fi
|
2000-06-11 13:12:56 +00:00
|
|
|
|
1999-11-11 16:10:37 -01:00
|
|
|
make distclean
|
|
|
|
make ${CODENAME}_status
|
2003-01-19 14:00:40 -01:00
|
|
|
if [ "$SKIPMIRRORCHECK" = "yes" ]; then
|
|
|
|
echo " ... WARNING: skipping mirror check"
|
|
|
|
else
|
|
|
|
echo " ... checking your mirror"
|
|
|
|
make mirrorcheck
|
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
echo "ERROR: Your mirror has a problem, please correct it." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2000-06-11 13:12:56 +00:00
|
|
|
fi
|
|
|
|
echo " ... selecting packages to include"
|
2001-12-16 22:15:07 -01:00
|
|
|
if [ -e ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. ] ; then
|
|
|
|
disks=`du -sm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. | \
|
|
|
|
awk '{print $1}'`
|
|
|
|
else
|
|
|
|
disks=0
|
|
|
|
fi
|
2000-06-11 13:12:56 +00:00
|
|
|
if [ -f $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc ]; then
|
|
|
|
. $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc
|
|
|
|
fi
|
|
|
|
SIZE_ARGS=''
|
2001-12-16 22:15:07 -01:00
|
|
|
for CD in 1 2 3 4 5 6 7 8; do
|
2000-06-11 13:12:56 +00:00
|
|
|
size=`eval echo '$'"BOOT_SIZE_${CD}"`
|
|
|
|
[ "$size" = "" ] && size=0
|
|
|
|
[ $CD = "1" ] && size=$(($size + $disks))
|
2002-04-07 16:26:59 +00:00
|
|
|
FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
|
2002-07-11 22:01:44 +00:00
|
|
|
echo "INFO: Reserving $size MB on the $CD cd. SIZELIMIT=$FULL_SIZE."
|
2002-04-07 16:26:59 +00:00
|
|
|
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
|
2000-06-11 13:12:56 +00:00
|
|
|
done
|
2002-04-07 16:26:59 +00:00
|
|
|
FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
|
|
|
|
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
|
2000-06-11 13:12:56 +00:00
|
|
|
echo " ... building the images"
|
2000-05-22 14:47:28 +00:00
|
|
|
make official_images
|
2000-06-11 13:12:56 +00:00
|
|
|
|
|
|
|
make imagesums
|