[Debian-live-changes] r1350 - dists/trunk/live-helper/examples

Daniel Baumann daniel at alioth.debian.org
Mon May 7 09:58:51 UTC 2007


Author: daniel
Date: 2007-05-07 09:58:51 +0000 (Mon, 07 May 2007)
New Revision: 1350

Modified:
   dists/trunk/live-helper/examples/snapshot-build.sh
Log:


Modified: dists/trunk/live-helper/examples/snapshot-build.sh
===================================================================
--- dists/trunk/live-helper/examples/snapshot-build.sh	2007-05-07 09:22:42 UTC (rev 1349)
+++ dists/trunk/live-helper/examples/snapshot-build.sh	2007-05-07 09:58:51 UTC (rev 1350)
@@ -2,14 +2,19 @@
 
 # Needs: build-essential fakeroot lsb-release svn [...]
 
+# Static variables
 PACKAGES="live-helper live-initramfs"
-SERVER="/srv/debian-unofficial/ftp/debian-live/debian-snapshot"
 
 DEBEMAIL="debian-live-devel at lists.alioth.debian.org"
 EMAIL="debian-live-devel at lists.alioth.debian.org"
 DEBFULLNAME="Debian Live Autobuilder"
 NAME="Debian Live Autobuilder"
 
+export DEBEMAIL EMAIL DEBFULLNAME NAME
+
+BUILD="/srv/tmp2"
+SERVER="/srv/debian-unofficial/ftp/debian-live/debian-snapshot"
+
 # Checking lock file
 if [ -f "${SERVER}"/Archive-Update-in-Progress ]
 then
@@ -29,28 +34,29 @@
 # Creating lock file
 touch "${SERVER}"/Archive-Update-in-Progress
 
+# Processing packages
 for PACKAGE in ${PACKAGES}
 do
-	# Creating directory
-	mkdir -p /srv/tmp2
+	# Creating build directory
+	mkdir -p "${BUILD}"
 
 	# Getting sources
-	cd /srv/tmp2
+	cd "${BUILD}"
 	svn co svn://svn.debian.org/debian-live/dists/trunk/${PACKAGE} ${PACKAGE}
 	cd "${OLDPWD}"
 
 	# Getting revision
-	cd /srv/tmp2/${PACKAGE}
+	cd "${BUILD}"/${PACKAGE}
 	REVISION="`svn info | awk '/Last Changed Rev: / { print $4 }'`"
-	mv /srv/tmp2/${PACKAGE} /srv/tmp2/${PACKAGE}-${REVISION}
+	mv "${BUILD}"/${PACKAGE} "${BUILD}"/${PACKAGE}-${REVISION}
 	cd "${OLDPWD}"
 
 	# Building package
-	cd /srv/tmp2/${PACKAGE}-${REVISION}
+	cd "${BUILD}"/${PACKAGE}-${REVISION}
 	dch --newversion ${REVISION} --distribution UNRELEASED Autobuild snapshot.
 	dpkg-buildpackage -rfakeroot -sa -uc -us
 	cd "${OLDPWD}"
-	rm -rf cd /srv/tmp2/${PACKAGE}-${REVISION}
+	rm -rf "${BUILD}"/${PACKAGE}-${REVISION}
 
 	# Creating directory
 	if [ ! -d "${SERVER}" ]
@@ -65,18 +71,23 @@
 	fi
 
 	# Moving packages
-	mv /srv/tmp2/${PACKAGE}* "${SERVER}"
+	mv "${BUILD}"/${PACKAGE}* "${SERVER}"
 done
 
-# Updating indices
+# Updating binary indices
 cd "${SERVER}"
 apt-ftparchive packages ./ > Packages
 gzip -9 -c Packages > Packages.gz
+cd "${OLDPWD}"
 
+# Updating source indices
+cd "${SERVER}"
 apt-ftparchive sources ./ > Sources
 gzip -9 -c Sources > Sources.gz
 cd "${OLDPWD}"
 
+# Updating timestamp
 echo "`date -R`" "${SERVER}"/LAST_BUILD
 
-rm -rf /srv/tmp2
+# Removing build directory
+rm -rf "${BUILD}"




More information about the Debian-live-changes mailing list