Skip to content

Commit

Permalink
autobuild: Factor out HOSTNAME variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwmjones committed Dec 7, 2010
1 parent 2dfc659 commit 75c179d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autobuild.sh
Expand Up @@ -2,18 +2,19 @@

PROJECT=febootstrap
MAILTO=libguestfs@redhat.com
HOSTNAME="$(hostname -s)"

#----------------------------------------------------------------------
# Helper functions.

failed ()
{
mail -s "$(hostname -s) $PROJECT FAILED $1 $gitsha" $MAILTO < local-log
mail -s "$HOSTNAME $PROJECT FAILED $1 $gitsha" $MAILTO < local-log
}

ok ()
{
mail -s "$(hostname -s) $PROJECT success $gitsha" $MAILTO < local-log
mail -s "$HOSTNAME $PROJECT success $gitsha" $MAILTO < local-log
}

#----------------------------------------------------------------------
Expand All @@ -25,7 +26,7 @@ rm -f local-log
cat > local-log <<EOF
This is an automatic message generated by the builder on
$(hostname -s) for $PROJECT. Log files from the build
$HOSTNAME for $PROJECT. Log files from the build
follow below.
$(uname -a)
Expand Down

0 comments on commit 75c179d

Please sign in to comment.