[Debian-live-changes] r1620 - in dists/trunk/live-webbuilder: . templates

daniel at alioth.debian.org daniel at alioth.debian.org
Tue May 22 21:29:52 UTC 2007


Author: daniel
Date: 2007-05-22 21:29:52 +0000 (Tue, 22 May 2007)
New Revision: 1620

Modified:
   dists/trunk/live-webbuilder/cron
   dists/trunk/live-webbuilder/templates/mail.txt
Log:


Modified: dists/trunk/live-webbuilder/cron
===================================================================
--- dists/trunk/live-webbuilder/cron	2007-05-22 21:20:39 UTC (rev 1619)
+++ dists/trunk/live-webbuilder/cron	2007-05-22 21:29:52 UTC (rev 1620)
@@ -114,50 +114,24 @@
 		# Creating image directory
 		mkdir -p "${DESTDIR}"/"${BUILD}"
 
-# First part of user email.
-cat > "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
-Subject: Debian Live Webbuilder - Build ${BUILD}
-From: Debian Live Webbuilder <debian-live-devel at lists.alioth.debian.org>
-To: ${EMAIL}
-
-Hi,
-
-this is the automatic Live builder from the Debian Live project
-<http://debian-live.alioth.debian.org/>.
-
-Your build with the ID ${BUILD} has been started at:
-${DATE_START}
-
-EOF
-
-
-		if [ "${?}" = "0" ]
+		# Creating mail
+		if [ "${ERROR}" = "0" ]
 		then
-
-cat >> "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
-and was sucessfully finished at:
-${DATE_END}
-
-You can download the images at:
-<http://${SERVER}/${BUILD}/>
-
-Have fun,
-the Debian Live team
-EOF
-
+			sed -e "s/BUILD/${BUILD}/g" \
+			    -e "s/EMAIL/${EMAIL}/" \
+			    -e "s/DATE_START/${DATE_START}/" \
+			    -e "s/DATE_END/${DATE_END}/" \
+			    -e "s/STATUS/maybe-successful/" \
+			    -e "s/SERVER/${SERVER}/" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
 		else
-
-cat >> "${TEMPDIR}"/"${BUILD}"/mail.txt << EOF
-and was unsucessfully finished at:
-${DATE_END}
-
-You can see the logs at:
-<${SERVER}/${BUILD}/>
-
-Have fun,
-the Debian Live team
-EOF
-
+			sed -e "s/BUILD/${BUILD}/g" \
+			    -e "s/EMAIL/${EMAIL}/" \
+			    -e "s/DATE_START/${DATE_START}/" \
+			    -e "s/DATE_END/${DATE_END}/" \
+			    -e "s/STATUS/maybe-failed/" \
+			    -e "s/SERVER/${SERVER}/" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
 		fi
 
 		# Moving binary image
@@ -178,9 +152,6 @@
 		# Moving log
 		mv "${TEMPDIR}"/"${BUILD}"/log.txt "${DESTDIR}"/"${BUILD}"
 
-		# Moving mail
-		mv "${TEMPDIR}"/"${BUILD}"/mail.txt "${DESTDIR}"/"${BUILD}"
-
 		# Generating md5sum
 		cd "${DESTDIR}"/"${BUILD}"
 		md5sum * > md5sum.txt

Modified: dists/trunk/live-webbuilder/templates/mail.txt
===================================================================
--- dists/trunk/live-webbuilder/templates/mail.txt	2007-05-22 21:20:39 UTC (rev 1619)
+++ dists/trunk/live-webbuilder/templates/mail.txt	2007-05-22 21:29:52 UTC (rev 1620)
@@ -13,7 +13,9 @@
 and ended at:
 DATE_END
 
-You can download the images at:
+The build was STATUS.
+
+You can see the log file and download the images from:
 <http://SERVER/BUILD/>
 
 Have fun,




More information about the Debian-live-changes mailing list