X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=buildd%2Fcronjob.sh;h=31a892eb725aa080f52d60701e29751c85f85612;hb=39edd534899386337f2dc63282157b124bda3a2d;hp=3ed1c5edb7d2e2f5c6cd921a85bc70eafd9f15a0;hpb=e725f1f7eca9945c0fcc88166f93e3654d7a2628;p=grml-live.git diff --git a/buildd/cronjob.sh b/buildd/cronjob.sh index 3ed1c5e..31a892e 100755 --- a/buildd/cronjob.sh +++ b/buildd/cronjob.sh @@ -15,6 +15,15 @@ # 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 @@ -23,29 +32,11 @@ fi echo $$ > /usr/share/grml-live/buildd/buildd_running -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_wheezy.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-small_wheezy.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-small_sid.sh - -/usr/share/grml-live/buildd/upload_isos.sh && \ -/usr/share/grml-live/buildd/remove_isos.sh - -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_wheezy.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_wheezy.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_sid.sh - -/usr/share/grml-live/buildd/upload_isos.sh && \ -/usr/share/grml-live/buildd/remove_isos.sh - -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_wheezy.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_sid.sh && \ -/usr/share/grml-live/buildd/grml-live_autobuild_grml-large_wheezy.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