# copyright 2012 Holger Levsen <holger@layer-acht.org>
# GPL2 licenced
-
set -e
-
export
-export DIST=squeeze
-export PB_SUITE=production-proposed-updates
-
#
# Define default settings
#
+export DIST=squeeze
+export PB_SUITE=production-proposed-updates
RSYNC_SRC=/srv/mirror/liveboot
RSYNC_FILTER=''
-
# WORK IN PROGRESS
-
# ri server
RSYNC_DST1="liveboot@riserver/liveboot/"
# pbb (mgmt5)
figlet "still work in progress, but... getting there"
BUILD_SCRIPT=$(mktemp)
-
cat > $BUILD_SCRIPT <<-EOF
cd /srv/build
git clone git://git/ri/liveboot.git
[ -d /srv/build/cache ] && mv /srv/build/cache .
./build.sh $BUILD_NUMBER $GIT_BRANCH
EOF
-
sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT
# FIXME: too much sudo here...
cd /srv/build/liveboot/builds
sudo mv *-* /srv/mirror/liveboot
-cd /srv/build/liveboot
-sudo mv cache ..
-cd ..
+cd /srv/build/
sudo rm liveboot -Rf
#
# cleanup /srv/mirror, keep MAX number of images
#
#MAX=15
-#cd $RSYNC_BASE
+#cd $RSYNC_SRC
#COUNT=0
#for i in $(ls -atd1 ./${LIVE_TYPE}-*) ; do
# let COUNT=COUNT+1
#done
#figlet "cleanup OK"
-echo "cleanup DISABLED"
+echo -n "cleanup DISABLED: "
+du -sh /srv/mirror/liveboot