[Debian-live-changes] r2491 - dists/trunk/live-helper/examples/cron

daniel at alioth.debian.org daniel at alioth.debian.org
Sun Jul 15 08:55:35 UTC 2007


Author: daniel
Date: 2007-07-15 08:55:35 +0000 (Sun, 15 Jul 2007)
New Revision: 2491

Added:
   dists/trunk/live-helper/examples/cron/manpages.sh
Log:


Added: dists/trunk/live-helper/examples/cron/manpages.sh
===================================================================
--- dists/trunk/live-helper/examples/cron/manpages.sh	                        (rev 0)
+++ dists/trunk/live-helper/examples/cron/manpages.sh	2007-07-15 08:55:35 UTC (rev 2491)
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# Needs: man2html svn
+
+# Static variables
+PACKAGES="live-helper live-initramfs live-initscripts live-webhelper"
+
+TEMPDIR="/srv/tmp/manpages"
+SERVER="/srv/debian-live/www/other/manpages"
+
+# Checking lock file
+if [ -f "${SERVER}"/lock ]
+then
+	echo "E: locked."
+	exit 1
+fi
+
+# Creating server directory
+if [ ! -d "${SERVER}" ]
+then
+	mkdir -p "${SERVER}"
+fi
+
+# Creating lock trap
+trap "test -f ${SERVER}/lock && rm -f ${SERVER}/lock; exit 0" 0 1 2 3 9 15
+
+# Creating lock file
+echo "${DATE_START}" > "${SERVER}"/lock
+
+echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin manpage build." >> /var/log/live
+
+# Remove old manpages
+rm -f "${SERVER}"/*.html
+
+# Processing packages
+for PACKAGE in ${PACKAGES}
+do
+	# Cleaning build directory
+	if [ -d "${TEMPDIR}" ]
+	then
+		rm -rf "${TEMPDIR}"
+	fi
+
+	# Creating build directory
+	mkdir -p "${TEMPDIR}"
+
+	# Getting sources
+	cd "${TEMPDIR}"
+	svn co svn://svn.debian.org/debian-live/dists/trunk/${PACKAGE} ${PACKAGE}
+
+	# Building manpages
+	for MANPAGE in ${PACKAGE}/manpages/*
+	do
+		man2html -D "${SERVER}" -r ${MANPAGE}
+	done
+
+	# Removing sources
+	rm -rf "${TEMPDIR}"/${PACKAGE}
+
+	cd "${OLDPWD}"
+done
+
+# Writing timestamp
+cat > "${SERVER}"/LAST_BUILD << EOF
+Last run begin: ${DATE_START}
+Last run end:   `date -R`
+EOF
+
+# Removing build directory
+rm -rf "${TEMPDIR}"
+
+echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end manpage build." >> /var/log/live


Property changes on: dists/trunk/live-helper/examples/cron/manpages.sh
___________________________________________________________________
Name: svn:executable
   + *




More information about the Debian-live-changes mailing list