2010-11-14 14:13:48 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
OUT=/mnt/nfs-cdimage/unofficial/non-free/firmware
|
|
|
|
TOPDIR=~/build
|
|
|
|
SUITE=$1
|
|
|
|
|
|
|
|
. $TOPDIR/CONF.sh
|
|
|
|
|
|
|
|
if [ "$SUITE"x = ""x ] ; then
|
|
|
|
echo "Need to know what to produce!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Do stuff here!
|
2017-06-06 12:10:48 +00:00
|
|
|
export TDIR=/srv/cdbuilder.debian.org/dst/deb-cd/tmp/firmware
|
2010-11-14 14:13:48 -01:00
|
|
|
export BASEDIR=$TOPDIR/debian-cd
|
|
|
|
mkdir -p $TDIR
|
2012-07-06 00:30:17 +00:00
|
|
|
fakeroot $BASEDIR/tools/make-firmware-image $MIRROR $SUITE $TDIR
|
2010-11-14 14:13:48 -01:00
|
|
|
|
|
|
|
DATE=`date +%Y%m%d`
|
|
|
|
mkdir -p $OUT/$SUITE/$DATE
|
2017-06-06 12:10:48 +00:00
|
|
|
mv $TDIR/firmware*.* $TDIR/*SUMS $OUT/$SUITE/$DATE/
|
|
|
|
|
|
|
|
if [ "$RELEASE_BUILD"x = ""x ] ; then
|
|
|
|
echo "Signing firmware checksums files using the automatic key"
|
|
|
|
~/build.stretch/sign-images $OUT/$SUITE/$DATE ""
|
|
|
|
fi
|
2010-11-14 14:13:48 -01:00
|
|
|
|
|
|
|
# Update the current link, and delete the old surplus builds. Keep up
|
|
|
|
# to 3
|
|
|
|
cd $OUT/$SUITE
|
|
|
|
rm -f current
|
|
|
|
ln -sf $DATE current
|
|
|
|
|
|
|
|
echo "Removing old firmware directories:"
|
|
|
|
NUM=`ls -d 20*/ 2>/dev/null |wc -l`
|
|
|
|
NUM=$(($NUM-6))
|
|
|
|
if [ "$NUM" -gt "0" ] ; then
|
|
|
|
REMOVE=`ls -1d 20* 2>/dev/null|head -n $NUM`
|
|
|
|
echo " $REMOVE"
|
|
|
|
rm -rf $REMOVE
|
|
|
|
fi
|