forked from kame/kame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
44 lines (38 loc) · 1.2 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/sh
#
# build script for KAME buildlab. may not be useful for normal usage.
# $KAME: build.sh,v 1.6 2001/02/09 12:36:40 itojun Exp $
#
echo the script is only for KAME buildlab, it is not useful in general
exit 1
PATH=/usr/pkg/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH
HOME=/home/buildlab
export HOME
hostname=`hostname`
date=`date`
x=`find /var/tmp -name autobuild\* -print`
if test "x" != "x$x"; then
mail -s "two autobuilds running: $hostname around $date" buildlab@kame.net <<EOF
two autobuilds are running.
EOF
exit 0
fi
if ! test -f $HOME/.cvspass; then
cat <<EOF >$HOME/.cvspass
:pserver:anoncvs@anoncvs.kame.net:/cvsroot/kame Ay=0=h<Z
EOF
fi
cd ~buildlab/k/kame
hosttop=`echo $hostname | sed -e 's/\..*//'`
make TARGET=$hosttop AUTOBUILD_COOKIE=/var/tmp/done.$$ autobuild 2>&1 | tee /var/tmp/autobuild.$$ | mail -s "$hostname autobuild at $date" $hosttop@buildlab.kame.net
if ! test -f /var/tmp/done.$$; then
mail -s "autobuild failure: $hostname around $date" buildlab@kame.net <<EOF
autobuild on $hostname seem to have failed.
started: $date
finished: `date`
result URL: http://master.buildlab.kame.net/$hosttop/
EOF
fi
rm /var/tmp/autobuild.$$
rm /var/tmp/done.$$