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

daniel at alioth.debian.org daniel at alioth.debian.org
Tue May 22 16:35:16 UTC 2007


Author: daniel
Date: 2007-05-22 16:35:15 +0000 (Tue, 22 May 2007)
New Revision: 1601

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


Modified: dists/trunk/live-webbuilder/cron-webbuilder
===================================================================
--- dists/trunk/live-webbuilder/cron-webbuilder	2007-05-22 16:31:10 UTC (rev 1600)
+++ dists/trunk/live-webbuilder/cron-webbuilder	2007-05-22 16:35:15 UTC (rev 1601)
@@ -14,7 +14,7 @@
 then
 	. /etc/defaults/live-webbuilder
 else
-	exit 0
+	exit 1
 fi
 
 # Exit if disabled
@@ -39,44 +39,93 @@
 # Ok from here spin through the live-webbuilder files we have waiting to build
 for LWB in "${TEMPDIR}"/*.lwb
 do
-	if [ -f "${LWB}" ]
+	# Pull in the meta file
+	. "${LWB}"
+	# Below are the current values that are expected to be their.
+	#echo ${BUILD_ID}
+	#echo ${EMAIL}
+	#echo ${BINARY_IMAGE}
+	#echo ${DISTRIBUTION}
+	#echo ${FILESYSTEM}
+	#echo ${PACKAGES_LISTS}
+	#echo ${PACKAGES}
+
+	# Assembling options
+	if [ -n "${BINARY_IMAGE}" ]
 	then
-		# Pull in the meta file
-		. "${LWB}"
-		# Below are the current values that are expected to be their.
-		#echo ${BUILD_ID}
-		#echo ${EMAIL}
-		#echo ${BINARY_IMAGE}
-		#echo ${DISTRIBUTION}
-		#echo ${FILESYSTEM}
-		#echo ${PACKAGES_LISTS}
-		#echo ${PACKAGES}
-		mkdir -p "${DESTDIR}"/${BUILD_ID}
-		cd "${DESTDIR}"/${BUILD_ID}
-		MAILER="Greetings,\nBeginning you build at: `date -R`"
-		echo "Begin: `date -R`"  > "${DESTDIR}"/${BUILD_ID}/log.txt
-		# Below is where we try to put is all together.
-		make-live --root "${DESTDIR}"/${BUILD_ID} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-binary ${MIRROR_BINARY} --packages-lists ${PACKAGES_LISTS} --binary-image ${BINARY_IMAGE} --distribution ${DISTRIBUTION} --filesystem ${FILESYSTEM} --packages "${PACKAGES}" --iso-volume "${ISO_VOLUME}" >> "${DESTDIR}"/${BUILD_ID}/log.txt 2>&1
-		MAILER="${MAILER}\nEnding your build at: `date -R`\nTo download your debian-live build see ${SITE_SERVER}/${BUILD_ID} "
-		echo "Ending: `date -R`"  >> "${DESTDIR}"/${BUILD_ID}/log.txt
-		echo  ${MAILER} | mail -s "End build od id - ${BUILD_ID}" ${EMAIL}
+		LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGE}"
+	fi
 
-		# Move the .lwb file to the target so we do not try to rebuild later
-		mv "${LWB}" "${DESTDIR}"/${BUILD_ID}
+	if [ -n "${DISTRIBUTION}" ]
+	then
+		LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
+	fi
 
-		# Do cleanup after
-		#cd "${DESTDIR}"/${BUILD_ID}
-		#lh_clean
+	if [ -n "${FILESYSTEM}" ]
+	then
+		LIVE_OPTIONS="${LIVE_OPTIONS} --filesystem ${FILESYSTEM}"
+	fi
 
-		# Unmount some things if still around
-		if [ -e "${DESTDIR}"/${BUILD_ID}/chroot/proc/version ]
-		then
-			umount "${DESTDIR}"/${BUILD_ID}/chroot/proc
-		fi
+	if [ -n "${ISO_VOLUME}" ]
+	then
+		LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
+	fi
 
-		if [ -d "${DESTDIR}"/${BUILD_ID}/chroot/sys/kernel ]
-		then
-			umount "${DESTDIR}"/${BUILD_ID}/chroot/sys
-		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_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 "${PACKAGES}" ]
+	then
+		LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
+	fi
+
+	if [ -n "${PACKAGES_LISTS}" ]
+	then
+		LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
+	fi
+
+	mkdir -p "${DESTDIR}"/${BUILD_ID}
+	cd "${DESTDIR}"/${BUILD_ID}
+	MAILER="Greetings,\nBeginning you build at: `date -R`"
+	echo "Begin: `date -R`"  > "${DESTDIR}"/${BUILD_ID}/log.txt
+	# Below is where we try to put is all together.
+	make-live --root "${DESTDIR}"/${BUILD_ID} ${LIVE_OPTIONS} >> "${DESTDIR}"/${BUILD_ID}/log.txt 2>&1
+	MAILER="${MAILER}\nEnding your build at: `date -R`\nTo download your debian-live build see ${SITE_SERVER}/${BUILD_ID} "
+	echo "Ending: `date -R`"  >> "${DESTDIR}"/${BUILD_ID}/log.txt
+	echo  ${MAILER} | mail -s "End build of id - ${BUILD_ID}" ${EMAIL}
+
+	# Move the .lwb file to the target so we do not try to rebuild later
+	mv "${LWB}" "${DESTDIR}"/${BUILD_ID}
+
+	# Do cleanup after
+	#cd "${DESTDIR}"/${BUILD_ID}
+	#lh_clean
+
+	# Unmount some things if still around
+	if [ -e "${DESTDIR}"/${BUILD_ID}/chroot/proc/version ]
+	then
+		umount "${DESTDIR}"/${BUILD_ID}/chroot/proc
+	fi
+
+	if [ -d "${DESTDIR}"/${BUILD_ID}/chroot/sys/kernel ]
+	then
+		umount "${DESTDIR}"/${BUILD_ID}/chroot/sys
+	fi
 done




More information about the Debian-live-changes mailing list