3 # Purpose: main configuration and function file for grml-live buildd
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 # Latest change: Don Okt 18 00:32:02 CEST 2007 [mika]
8 ################################################################################
11 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
14 OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$"
16 MUTT_HEADERS=$(mktemp)
17 ATTACHMENT=$TMP_DIR/grml-live-logs_$DATE.tar.gz
18 [ -n "$ARCH" ] && GRML_LIVE_ARCH="-a $ARCH"
19 [ -n "$TMP_DIR" ] || exit 10
20 [ -n "$MUTT_HEADERS" ] || exit 20
21 RECIPIENT=root@localhost
22 ISO_DIR=/grml-live/grml-isos
23 echo "my_hdr From: grml-live autobuild daemon <root@localhost>" > $MUTT_HEADERS
27 grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \
28 -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \
29 1>/var/log/fai/dirinstall/grml/grml-live.stdout \
30 2>/var/log/fai/dirinstall/grml/grml-live.stderr ; RC=$?
32 if [ "$RC" = "0" ] ; then
41 tar zcf $ATTACHMENT /var/log/fai/dirinstall/grml 1>/dev/null
45 if ! [ -f "$OUTPUT_DIR/grml_isos/$ISO_NAME" ] ; then
46 ISO_DETAILS="There was an error creating $ISO_NAME"
48 ISO_DETAILS=$(ls -lh $OUTPUT_DIR/grml_isos/$ISO_NAME)
54 echo -en "Automatically generated mail by $SCRIPTNAME
58 Return code of grml-live run was: $RC
60 The following errors have been noticed (several might be warnings only):
62 $(grep error /var/log/fai/dirinstall/grml/* | grep -ve liberror -ve libgpg-error)
64 The following warnings have been noticed:
66 $(grep warn /var/log/fai/dirinstall/grml/*)
68 Find details in the attached logs." | \
69 mutt -s "grml-live_autobuild_grml-large_sid.sh [${DATE}] - $RC" \
75 # make sure we store the final iso:
76 [ -d "$ISO_DIR" ] || mkdir "$ISO_DIR"
77 mv $OUTPUT_DIR/grml_isos/$ISO_NAME $ISO_DIR
81 rm -rf "$TMP_DIR" "$MUTT_HEADERS" "$OUTPUT_DIR"
86 ## END OF FILE #################################################################