use $Id$ also for build_test
[amitay/build-farm.git] / build_test
1 #!/bin/bash
2 # this is the main build script for build.samba.org
3 # it gets run on all the build boxes via cron
4
5 # any errors get put in build.log
6
7 # we used a fixed path that is a superset of the required paths.
8 PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/bsd
9 export PATH
10
11 build_test_id=`$Id$`
12
13 # go to our main directory
14 cd ~/build_farm || exit 1
15
16 (
17
18     echo
19     date
20
21     # we only want the short name of the host - use cut for portability
22     host=`hostname | cut -d. -f1`
23
24     # make sure the password isn't readable by anyone
25     chmod 600 .password
26
27     # grab the latest versions of the scripts
28     rsync --delete --include='*.fns' --exclude='*' --timeout=200 -q -az samba.org::build_farm/ .
29
30     # load general functions
31     . build_test.fns
32
33     if [ -f $host.fns ]; then
34       # load host specific functions
35       $build_test_used_fns_file = "$host.fns"
36     else
37       $build_test_used_fns_file = "generic.fns"
38     fi
39     . $build_test_used_fns_file
40
41 ) >> build.log 2>&1