X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=buildd%2Fcronjob.sh;h=31a892eb725aa080f52d60701e29751c85f85612;hb=94a95c08610cd864daf93d760505efd626920934;hp=80b63d45efa8519da7feef8bae6af93853c1eae9;hpb=8194543299a213d9597b85d726fe2085064dfcc7;p=grml-live.git diff --git a/buildd/cronjob.sh b/buildd/cronjob.sh old mode 100644 new mode 100755 index 80b63d4..31a892e --- a/buildd/cronjob.sh +++ b/buildd/cronjob.sh @@ -7,9 +7,23 @@ ################################################################################ # Add something like that to the crontab to execute grml-live buildd # every day at a specific time: -# 30 1 * * * /usr/share/grml-live/buildd/cronjob.sh +# 50 0 * * * /usr/share/grml-live/buildd/cronjob.sh +# +# On the mirror (where you're hosting the ISOs) you might want to +# install something like that in your crontab: +# 02 * * * * /home/mika/cronjobs/link_latest.sh +# 03 03 * * * /home/mika/cronjobs/cleanup.sh ################################################################################ +die() { + [ -n "$1" ] && echo "$1">&2 + exit 1 +} + +. /etc/grml/grml-buildd.conf || die "Could not source /etc/grml/grml-buildd.conf. Exiting." + +[ -n "$FLAVOURS" ] || die "\$FLAVOURS is not set. Exiting." + if [ -r /usr/share/grml-live/buildd/buildd_running ] ; then echo "already running instance of grml-live buildd found, exiting.">&2 echo "if you think this is not true: rm /usr/share/grml-live/buildd/buildd_running">&2 @@ -18,29 +32,11 @@ fi echo $$ > /usr/share/grml-live/buildd/buildd_running -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-small_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-small_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-small_sid.sh - -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_sid.sh - -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-large_lenny.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-large_squeeze.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-large_sid.sh - -/usr/share/grml-live/buildd/upload_isos.sh && \ -/usr/share/grml-live/buildd/remove_isos.sh +for flavour in $FLAVOURS; do + /usr/share/grml-live/buildd/grml-live_autobuild_${flavour}.sh + /usr/share/grml-live/buildd/upload_isos.sh && \ + /usr/share/grml-live/buildd/remove_isos.sh +done rm -f /usr/share/grml-live/buildd/buildd_running