X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=buildd%2Ffunctions.sh;h=70f728784196bc5e1351a8bd702f7f48ef299436;hp=36d71e72d4194bb6d34ad247b72d69dff47e9b86;hb=f91e72be58ef96620d49f850526b3dc010bddda8;hpb=088fef04f9106288d97830ea81375ec80f095286 diff --git a/buildd/functions.sh b/buildd/functions.sh index 36d71e7..70f7287 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Filename: /usr/share/grml-live/buildd/functions.sh # Purpose: main function file for grml-live buildd # Authors: grml-team (grml.org), (c) Michael Prokop @@ -13,7 +13,7 @@ die() { . /etc/grml/grml-buildd.conf || die "Could not source /etc/grml/grml-buildd.conf. Exiting." -type -p mutt 1>/dev/null 2>&1 || die "mutt binary not found. Exiting." +which mutt >/dev/null 2>&1 || die "mutt binary not found. Exiting." # exit if important variables aren't set: [ -n "$STORAGE" ] || die "\$STORAGE is not set. Exiting." @@ -29,7 +29,6 @@ TMP_DIR="$(mktemp -d)" MUTT_HEADERS="$(mktemp)" [ -n "$TMP_DIR" ] || die "Could not create \$TMP_DIR. Exiting." [ -n "$MUTT_HEADERS" ] || die "Could not create $\MUTT_HEADERS. Exiting." -[ -n "$ARCH" ] && GRML_LIVE_ARCH="-a $ARCH" # make sure we have same safe defaults: [ -n "$OUTPUT_DIR" ] || OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$" @@ -37,6 +36,7 @@ MUTT_HEADERS="$(mktemp)" [ -n "$RECIPIENT" ] || RECIPIENT=root@localhost [ -n "$ATTACHMENT" ] || ATTACHMENT="$TMP_DIR/grml-live-logs_$DATE.tar.gz" [ -n "$FROM" ] || FROM=root@localhost +[ -n "$ARCH" ] || ARCH="$(dpkg --print-architecture)" if [ -n "$LOGFILE" ] ; then GRML_LOGFILE="$LOGFILE" @@ -69,7 +69,7 @@ grml_live_run() { grml_name="$NAME-daily-$CODENAME" shortdate="$(date +%y%m%d)" - grml-live -F $* $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ + grml-live -F $* -a $ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ -g "$grml_name" -v "$shortdate" -r grml-live-autobuild -i $ISO_NAME \ 1>/var/log/grml-buildd.stdout \ 2>/var/log/grml-buildd.stderr ; RC=$?