Disable set -e as it causes some problems with umounting fs.
[grml-live.git] / buildd / cronjob.sh
1 #!/bin/sh
2 # Filename:      cronjob.sh
3 # Purpose:       example for a grml-live buildd cronjob setup
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8 # Add something like that to the crontab to execute grml-live buildd
9 # every day at a specific time:
10 # 50 0 * * * /usr/share/grml-live/buildd/cronjob.sh
11 #
12 # On the mirror (where you're hosting the ISOs) you might want to
13 # install something like that in your crontab:
14 # 02  * * * * /home/mika/cronjobs/link_latest.sh
15 # 03 03 * * * /home/mika/cronjobs/cleanup.sh
16 ################################################################################
17
18 if [ -r /usr/share/grml-live/buildd/buildd_running ] ; then
19   echo "already running instance of grml-live buildd found, exiting.">&2
20   echo "if you think this is not true: rm /usr/share/grml-live/buildd/buildd_running">&2
21   exit 1
22 fi
23
24 echo $$ > /usr/share/grml-live/buildd/buildd_running
25
26 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_squeeze.sh && \
27 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_wheezy.sh && \
28 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-small_sid.sh && \
29 /usr/share/grml-live/buildd/grml-live_autobuild_grml-small_squeeze.sh && \
30 /usr/share/grml-live/buildd/grml-live_autobuild_grml-small_wheezy.sh && \
31 /usr/share/grml-live/buildd/grml-live_autobuild_grml-small_sid.sh
32
33 /usr/share/grml-live/buildd/upload_isos.sh && \
34 /usr/share/grml-live/buildd/remove_isos.sh
35
36 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_squeeze.sh && \
37 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_wheezy.sh && \
38 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-medium_sid.sh && \
39 /usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_squeeze.sh && \
40 /usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_wheezy.sh && \
41 /usr/share/grml-live/buildd/grml-live_autobuild_grml-medium_sid.sh
42
43 /usr/share/grml-live/buildd/upload_isos.sh && \
44 /usr/share/grml-live/buildd/remove_isos.sh
45
46 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_squeeze.sh && \
47 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_wheezy.sh && \
48 /usr/share/grml-live/buildd/grml-live_autobuild_grml64-large_sid.sh && \
49 /usr/share/grml-live/buildd/grml-live_autobuild_grml-large_squeeze.sh && \
50 /usr/share/grml-live/buildd/grml-live_autobuild_grml-large_wheezy.sh && \
51 /usr/share/grml-live/buildd/grml-live_autobuild_grml-large_sid.sh
52
53 /usr/share/grml-live/buildd/upload_isos.sh && \
54 /usr/share/grml-live/buildd/remove_isos.sh
55
56 rm -f /usr/share/grml-live/buildd/buildd_running
57
58 ## END OF FILE #################################################################