[Fai-commit] r4159 - people/h01ger/live-CD

Holger Levsen h01ger-guest at alioth.debian.org
Sat Nov 18 15:23:56 CET 2006


Author: h01ger-guest
Date: 2006-11-18 15:23:56 +0100 (Sat, 18 Nov 2006)
New Revision: 4159

Added:
   people/h01ger/live-CD/build.sh
Log:
- added script for automated building


Added: people/h01ger/live-CD/build.sh
===================================================================
--- people/h01ger/live-CD/build.sh	2006-11-13 18:49:22 UTC (rev 4158)
+++ people/h01ger/live-CD/build.sh	2006-11-18 14:23:56 UTC (rev 4159)
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# (c) 2006 Holger Levsen <debian at layer-acht.org>
+# Licended under GPL2
+#
+#
+# build script for fai live-cd
+#
+##############################################################################
+
+#
+# only build in ~/live-CD
+#
+cd
+BUILD_DIR="live-CD"
+if [ ! -d $BUILD_DIR ] ; then
+	echo "`pwd`$BUILD_DIR doesn't exist, aborting."
+	echo
+	echo "cd && svn co svn://svn.debian.org/svn/fai/people/h01ger/live-CD ./live-CD"
+	exit 1
+fi
+
+PUBLISH_DIR="/www/webserver/lambda.holgerlevsen.de/htdocs/"
+LOCKFILE="/var/lock/failive-build"
+LOGFILE=`mktemp`
+TODAY="`date +%Y%m%d%H%M`"
+
+#
+# check lockfile
+#
+if [ -f "$LOCKFILE" ] ; then
+	echo $LOCKFILE exists, aborting
+	exit 1
+fi
+touch $LOCKFILE
+
+#
+# cleanup & prepare
+#
+cd $BUILD_DIR 
+sudo rm debian-live -rf
+[ $? ] || echo "problems removing old build"
+# display diffs from current local version to version in repository
+svn diff --revision HEAD
+# update to version in repository
+svn up
+
+#
+# build
+#
+nice sudo /usr/sbin/make-live --hook live-include-dir/hook --config make-live.conf > $LOGFILE 2>&1
+
+#
+# publish
+# 
+if [ -f debian-live/binary.iso ] ; then
+  cp debian-live/binary.iso $PUBLISH_DIR/failive-${TODAY}.iso
+else 
+  echo "#########################################################"
+  echo 
+  echo "An error occured, .iso was not created :-("
+  echo 
+fi 
+cp $LOGFILE $PUBLISH_DIR/failive-${TODAY}.log
+chmod 644 $PUBLISH_DIR/failive-${TODAY}.log
+rm $LOGFILE
+
+#
+# cleanup lockfile
+#
+rm $LOCKFILE
+
+#
+# cleanup old images and logs
+# todo: enable rm for real
+#
+cd $PUBLISH_DIR
+#find . -mtime +1 !  -name "failive-*00.???" -exec echo rm {} \;
+#find . -mtime +2 !  -name "failive-1600.???" -exec echo rm {} \;
+#find . -mtime +14 ! -name "failive-0400.???" -exec echo rm {} \;
+


Property changes on: people/h01ger/live-CD/build.sh
___________________________________________________________________
Name: svn:executable
   + *




More information about the Fai-commit mailing list