mnightly
1.61 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /bin/sh
#
# An example of how one could invoke mmake from a crontab entry is
#
# 1 2 * * * /usr/bin/nice sh $HOME/build/mnightly > /dev/null 2>&1
#
# (cron will fire off this script every morning at 2:01am).
#
#
# Need the following environment variables to build
#
PATH=.:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin:/etc:/usr/etc:/usr/bin/X11
export PATH
VCS_NETHOST=ubangi
export VCS_NETHOST
ECS_ROOT=/hosts/venice/ecad/ecs/ecs_2.4
export ECS_ROOT
INSTOPTS=-t
export INSTOPTS
BUILD=$HOME/mdevroot
cd $BUILD
USAGE="mnightly [-a], where -a optionally runs nightly regressions"
REGRESSION=FALSE
while getopts a c
do
case $c in
a) REGRESSION=TRUE ;;
\?) echo $USAGE; exit 2 ;;
esac
done
#
# This assumes you have automount running to gain access to the source tree.
#
if [ -s /hosts/madman/mdev/PR/doc/mmake ]
then
cp /hosts/madman/mdev/PR/doc/mmake $HOME/bin/mmake
chmod +rw $HOME/bin/mmake
fi
#
# To temporarily turn off nightly builds, create a file called ultra64.skip
# in your $HOME/mdevroot directory.
#
if [ ! -f $BUILD/ultra64.skip ]
then
{
# trap "rm -f $BUILD/ultra64.skip; exit 0" 0 1 2 15
# touch $BUILD/ultra64.skip
date
echo "\n\nSTARTING NIGHTLY ULTRA64 BUILD\n\n"
set -x
WORKAREA=$HOME/mdevroot
if test $REGRESSION = TRUE
then
$HOME/bin/mmake -acuH -W $WORKAREA
else
$HOME/bin/mmake -cuH -W $WORKAREA
fi
echo "\n\nDONE NIGHTLY ULTRA64 BUILD\n\n"
date
# rm $BUILD/ultra64.skip
} > $BUILD/rawbuildlog 2>&1
fi
fold -1022 $BUILD/rawbuildlog > ultra64.log
rm rawbuildlog
$HOME/build/filter_buildlog ultra64.log | /usr/sbin/Mail -s "ULTRA64 build" $LOGNAME