[Debian-live-changes] r1617 - dists/trunk/live-webbuilder

daniel at alioth.debian.org daniel at alioth.debian.org
Tue May 22 21:06:39 UTC 2007


Author: daniel
Date: 2007-05-22 21:06:39 +0000 (Tue, 22 May 2007)
New Revision: 1617

Modified:
   dists/trunk/live-webbuilder/cron
Log:


Modified: dists/trunk/live-webbuilder/cron
===================================================================
--- dists/trunk/live-webbuilder/cron	2007-05-22 21:00:32 UTC (rev 1616)
+++ dists/trunk/live-webbuilder/cron	2007-05-22 21:06:39 UTC (rev 1617)
@@ -37,68 +37,70 @@
 touch /var/lock/live-webbuilder.lock
 
 # Ok from here spin through the live-webbuilder files we have waiting to build
-for FILE in "${TEMPDIR}"/*.build
-do
-	DATE_START="`date -R`"
+if ls "${TEMPDIR}"/*.build &> /dev/null
+then
+	for FILE in "${TEMPDIR}"/*.build
+	do
+		DATE_START="`date -R`"
 
-	# Reading build file
-	. "${FILE}"
+		# Reading build file
+		. "${FILE}"
 
-	# Assembling options
-	if [ -n "${BINARY_IMAGE}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGE}"
-	fi
+		# Assembling options
+		if [ -n "${BINARY_IMAGE}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGE}"
+		fi
 
-	if [ -n "${DISTRIBUTION}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
-	fi
+		if [ -n "${DISTRIBUTION}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
+		fi
 
-	if [ -n "${FILESYSTEM}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --filesystem ${FILESYSTEM}"
-	fi
+		if [ -n "${FILESYSTEM}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --filesystem ${FILESYSTEM}"
+		fi
 
-	if [ -n "${ISO_VOLUME}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
-	fi
+		if [ -n "${ISO_VOLUME}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
+		fi
 
-	if [ -n "${MIRROR_BOOTSTRAP}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
-	fi
+		if [ -n "${MIRROR_BOOTSTRAP}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
+		fi
 
-	if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
-	fi
+		if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
+		fi
 
-	if [ -n "${MIRROR_BINARY}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
-	fi
+		if [ -n "${MIRROR_BINARY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
+		fi
 
-	if [ -n "${MIRROR_BINARY_SECURITY}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
-	fi
+		if [ -n "${MIRROR_BINARY_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
+		fi
 
-	if [ -n "${PACKAGES}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
-	fi
+		if [ -n "${PACKAGES}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
+		fi
 
-	if [ -n "${PACKAGES_LISTS}" ]
-	then
-		LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
-	fi
+		if [ -n "${PACKAGES_LISTS}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
+		fi
 
-	# Creating build directory
-	mkdir -p "${TEMPDIR}"/"${BUILD}"
+		# Creating build directory
+		mkdir -p "${TEMPDIR}"/"${BUILD}"
 
-	cd "${TEMPDIR}"/"${BUILD}"
+		cd "${TEMPDIR}"/"${BUILD}"
 
 # First part of user email.
 cat > "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
@@ -116,21 +118,21 @@
 
 EOF
 
-	echo "Begin: `date -R`" > "${TEMPDIR}"/"${BUILD}"/log.txt
+		echo "Begin: `date -R`" > "${TEMPDIR}"/"${BUILD}"/log.txt
 
-	# Generating image
-	make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log.txt 2>&1
-	ERROR="${?}"
+		# Generating image
+		make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log.txt 2>&1
+		ERROR="${?}"
 
-	DATE_END="`date -R`"
+		DATE_END="`date -R`"
 
-	# Creating image directory
-	mkdir -p "${DESTDIR}"/"${BUILD}"
+		# Creating image directory
+		mkdir -p "${DESTDIR}"/"${BUILD}"
 
-	echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log.txt
+		echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log.txt
 
-	if [ "${?}" = "0" ]
-	then
+		if [ "${?}" = "0" ]
+		then
 
 cat >> "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
 and was sucessfully finished at:
@@ -143,7 +145,7 @@
 the Debian Live team
 EOF
 
-	else
+		else
 
 cat >> "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
 and was unsucessfully finished at:
@@ -156,49 +158,50 @@
 the Debian Live team
 EOF
 
-	fi
+		fi
 
-	# Moving binary image
-	if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* &> /dev/null
-	then
-		mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
-	fi
+		# Moving binary image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* &> /dev/null
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
+		fi
 
-	# Moving source image
-	if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* &> /dev/null
-	then
-		mv "${TEMPDIR}"/"${BUILD}"/debian-live/source.* "${DESTDIR}"/"${BUILD}"
-	fi
+		# Moving source image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* &> /dev/null
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/source.* "${DESTDIR}"/"${BUILD}"
+		fi
 
-	# Moving build
-	mv "${TEMPDIR}"/"${BUILD}".build "${DESTDIR}"/"${BUILD}"/build
+		# Moving build
+		mv "${TEMPDIR}"/"${BUILD}".build "${DESTDIR}"/"${BUILD}"/build
 
-	# Moving log
-	mv "${TEMPDIR}"/"${BUILD}"/log.txt "${DESTDIR}"/"${BUILD}"
+		# Moving log
+		mv "${TEMPDIR}"/"${BUILD}"/log.txt "${DESTDIR}"/"${BUILD}"
 
-	# Moving mail
-	mv "${TEMPDIR}"/"${BUILD}"/mail.txt "${DESTDIR}"/"${BUILD}"
+		# Moving mail
+		mv "${TEMPDIR}"/"${BUILD}"/mail.txt "${DESTDIR}"/"${BUILD}"
 
-	# Generating md5sum
-	cd "${DESTDIR}"/"${BUILD}"
-	md5sum * > md5sum.txt
-	cd "${OLDPWD}"
+		# Generating md5sum
+		cd "${DESTDIR}"/"${BUILD}"
+		md5sum * > md5sum.txt
+		cd "${OLDPWD}"
 
-	# Sending mail
-	cat "${DESTDIR}"/"${BUILD}"/mail.txt | /usr/sbin/sendmail -t
+		# Sending mail
+		cat "${DESTDIR}"/"${BUILD}"/mail.txt | /usr/sbin/sendmail -t
 
-	# Unmounting proc
-	if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
-	then
-		umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
-	fi
+		# Unmounting proc
+		if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
+		then
+			umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
+		fi
 
-	# Unmounting sysfs
-	if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
-	then
-		umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
-	fi
+		# Unmounting sysfs
+		if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
+		then
+			umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
+		fi
 
-	# Removing build directory
-	rm -rf "${TEMPDIR}"/"${BUILD}"
-done
+		# Removing build directory
+		rm -rf "${TEMPDIR}"/"${BUILD}"
+	done
+fi




More information about the Debian-live-changes mailing list