diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:05:15 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:26 +0100 |
commit | c79ab34a7c597c9e3ab202c644121c6944789424 (patch) | |
tree | 324691f4f851c719b864229b399584f035b2873f /examples | |
parent | 0d5ff4ca7596790f853cf637e0fe225cad810a76 (diff) | |
download | live-build-c79ab34a7c597c9e3ab202c644121c6944789424.zip live-build-c79ab34a7c597c9e3ab202c644121c6944789424.tar.gz |
Adding live-helper 1.0~a19-1.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cron/crontab | 1 | ||||
-rwxr-xr-x | examples/cron/etch.sh | 10 | ||||
-rwxr-xr-x | examples/cron/lenny.sh | 8 | ||||
-rwxr-xr-x | examples/cron/manpages.sh | 99 | ||||
-rwxr-xr-x | examples/cron/sid.sh | 12 | ||||
-rwxr-xr-x | examples/cron/snapshots.sh | 2 | ||||
-rwxr-xr-x | examples/hooks/win32-loader.sh | 12 |
7 files changed, 128 insertions, 16 deletions
diff --git a/examples/cron/crontab b/examples/cron/crontab index 470be6e..960f5e9 100644 --- a/examples/cron/crontab +++ b/examples/cron/crontab @@ -4,4 +4,5 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command +*/10 * * * * user /usr/share/doc/live-helper/examples/cron/manpages.sh > /dev/null 2>&1 */10 * * * * user /usr/share/doc/live-helper/examples/cron/snapshots.sh > /dev/null 2>&1 diff --git a/examples/cron/etch.sh b/examples/cron/etch.sh index 3f647aa..49c62b7 100755 --- a/examples/cron/etch.sh +++ b/examples/cron/etch.sh @@ -2,16 +2,16 @@ set -e -BUILD="etch" +BUILD="monthly" # Begin custom defaults AUTOBUILD="enabled" -DATE="r0_1.0~a18-1" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DATE="`date +%Y%m%d`" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs casper" +OPTIONS="--initramfs casper --apt-recommends disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="etch" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/casper/filesystem.manifest "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} diff --git a/examples/cron/lenny.sh b/examples/cron/lenny.sh index 0ce64f0..10cef51 100755 --- a/examples/cron/lenny.sh +++ b/examples/cron/lenny.sh @@ -2,16 +2,16 @@ set -e -BUILD="lenny" +BUILD="weekly" # Begin custom defaults AUTOBUILD="enabled" DATE="`date +%Y%m%d`" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs live-initramfs" +OPTIONS="--apt-recommends disabled --security disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="lenny" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} diff --git a/examples/cron/manpages.sh b/examples/cron/manpages.sh new file mode 100755 index 0000000..571ea14 --- /dev/null +++ b/examples/cron/manpages.sh @@ -0,0 +1,99 @@ +#!/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" + +DATE_START="`date -R`" + +# 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 "${TEMPDIR}"/${PACKAGE}/manpages/* + do + man2html -D "${SERVER}"/ -r ${MANPAGE} | \ + sed -e "s#Content-type: text/html##" \ + -e 's#HREF="../index.html"#HREF="./"#' \ + -e 's#HREF="../man1/#HREF="#g' \ + -e 's#HREF="../man2/#HREF="#g' \ + -e 's#HREF="../man3/#HREF="#g' \ + -e 's#HREF="../man4/#HREF="#g' \ + -e 's#HREF="../man5/#HREF="#g' \ + -e 's#HREF="../man6/#HREF="#g' \ + -e 's#HREF="../man7/#HREF="#g' \ + -e 's#HREF="../man8/#HREF="#g' \ + -e 's#HREF="../man9/#HREF="#g' \ + -e 's#/cgi-bin/man/man2html#http://packages.debian.org/man2html#' \ + > "${SERVER}"/`basename ${MANPAGE}`.html + done + + # Removing sources + rm -rf "${TEMPDIR}"/${PACKAGE} + + cd "${OLDPWD}" +done + +# Creating symlinks +for NUMBER in 1 2 3 4 5 6 7 8 9 +do + for MANPAGE in "${SERVER}"/*.en.${NUMBER}.html + do + if [ -f "${MANPAGE}" ] + then + ln -s `basename ${MANPAGE}` "${SERVER}"/`basename ${MANPAGE} .en.${NUMBER}.html`.${NUMBER}.html + fi + done +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 diff --git a/examples/cron/sid.sh b/examples/cron/sid.sh index 1d7a5a7..7769fef 100755 --- a/examples/cron/sid.sh +++ b/examples/cron/sid.sh @@ -2,16 +2,16 @@ set -e -BUILD="sid" +BUILD="daily" # Begin custom defaults AUTOBUILD="enabled" DATE="`date +%Y%m%d`" -DESTDIR="/srv/debian-unofficial/ftp/debian-live/cdimage" +DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" -OPTIONS="--binary-indices disabled --initramfs live-initramfs" +OPTIONS="--apt-recommends disabled" ARCHITECTURES="`dpkg --print-architecture`" DISTRIBUTIONS="sid" @@ -82,7 +82,7 @@ do # Moving logs mv "${TEMPDIR}"/debian-live/log.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-log.txt - mv "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt + cp "${TEMPDIR}"/debian-live/binary/packages.txt "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-iso-packages.txt # Creating images directory mkdir -p "${DESTDIR}"/"${BUILD}"-builds/${DATE}/${ARCHITECTURE} @@ -96,10 +96,10 @@ do if [ ! -f "${DESTDIR}"/"${BUILD}"-builds/${DATE}/log/debian-live-${DISTRIBUTION}-${ARCHITECTURE}-${PACKAGES_LIST}_${DATE}-usb-hdd-log.txt ] then # Workaround of missing multi-binary support in live-helper - mv "${TEMPDIR}"/debian-live/binary/casper "${TEMPDIR}"/debian-live/casper.tmp + mv "${TEMPDIR}"/debian-live/binary/live "${TEMPDIR}"/debian-live/live.tmp rm -rf "${TEMPDIR}"/debian-live/binary* "${TEMPDIR}"/debian-live/.stage/binary_* mkdir "${TEMPDIR}"/debian-live/binary - mv "${TEMPDIR}"/debian-live/casper.tmp "${TEMPDIR}"/debian-live/binary/casper + mv "${TEMPDIR}"/debian-live/live.tmp "${TEMPDIR}"/debian-live/binary/live touch "${TEMPDIR}"/debian-live/.stage/binary_chroot touch "${TEMPDIR}"/debian-live/.stage/binary_rootfs diff --git a/examples/cron/snapshots.sh b/examples/cron/snapshots.sh index 00d818c..bdf6433 100755 --- a/examples/cron/snapshots.sh +++ b/examples/cron/snapshots.sh @@ -12,7 +12,7 @@ NAME="Debian Live Autobuilder" export DEBEMAIL EMAIL DEBFULLNAME NAME -TEMPDIR="/srv/tmp/svn-snapshots" +TEMPDIR="/srv/tmp/snapshots" SERVER="/srv/debian-unofficial/ftp/debian-live-snapshots" DATE_START="`date -R`" diff --git a/examples/hooks/win32-loader.sh b/examples/hooks/win32-loader.sh new file mode 100755 index 0000000..ee328c5 --- /dev/null +++ b/examples/hooks/win32-loader.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install win32-loader. +# win32-loader was written by Robert Milan <rmh@aybabtu.com>. +# +# To enable it, copy this hook into your config/binary_local-hooks directory. + +cd binary + +wget http://goodbye-microsoft.com/pub/debian.exe + +cd "${OLDPWD}" |