Add procfd.c with gpfs_set_winattrs_path()
[slow/toolbox.git] / autobuild.sh
1 #!/bin/sh
2
3 BRANCH="BRANCH=develop"
4 NOTAG="NOTAG=1"
5
6 set -- `getopt b:t: $*`
7 if [ $? != 0 ]
8 then
9     echo "autobuild.sh [-b branch (default: develop] [-t (use build tag)]" 
10     exit 2
11 fi
12 for i in $*
13 do
14     case $i in
15         -b)
16             BRANCH="BRANCH=$2"
17             shift 2;;
18         -t)
19             NOTAG=""
20             shift;;
21         --)
22             shift;
23             break;;
24     esac
25 done
26
27 echo "Building branch \"$BRANCH\" ($NOTAG)"
28
29 #
30 # Helper funcs
31 #
32
33 print_os() {
34     echo "**********************************************************************************"
35     echo "* Now building $1"
36     echo "**********************************************************************************"
37 }
38
39 start_vm() {
40     printf "Starting VM $1 ... "
41     VBoxHeadless -s $1 > /dev/null 2>&1 &
42     sleep 5
43     echo done
44 }
45
46 stop_vm() {
47     printf "Stopping VM $1 ... "
48     VBoxManage controlvm $1 savestate > /dev/null 2>&1
49     echo done
50 }
51
52 #
53 # OS funcs
54 #
55
56 openbsd5() {
57     print_os "OpenBSD 5"
58     start_vm openbsd5
59     ssh ralph@10.10.10.213 "export AUTOCONF_VERSION=2.65; export AUTOMAKE_VERSION=1.10; cd netatalk/pkg/3-0; git pull > /dev/null 2>&1; gmake $BRANCH $NOTAG"
60     stop_vm openbsd5
61 }
62
63 solaris10_x86() {
64     print_os "Solaris 10 x86"
65     start_vm solx10
66     ssh ralph@10.10.10.208 "PATH=/usr/ccs/bin:/usr/local/bin:/opt/csw/bin:/usr/sfw/bin:/usr/bin ; cd netatalk/pkg/3-0; git pull > /dev/null 2>&1; gmake $BRANCH $NOTAG"
67     stop_vm solx10
68 }
69
70 solaris10_sparc() {
71     print_os "Solaris 10 SPARC"
72     ssh ralph@10.10.10.209 "PATH=/usr/local/bin:/opt/csw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:/opt/sfw/bin ; cd netatalk/pkg/3-0; git pull > /dev/null 2>&1; gmake $BRANCH $NOTAG"
73 }
74
75 freebsd8_x86() {
76     print_os "FreeBSD 8 x86"
77     start_vm freebsd8
78     ssh ralph@10.10.10.205 "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin ; cd netatalk/pkg/3-0; git pull > /dev/null 2>&1; gmake $BRANCH $NOTAG"
79     stop_vm freebsd8
80 }
81
82 linux_x64() {
83     print_os "Linux x64"
84     ssh ralph@netafp.com "PATH=/usr/bin:/bin ; cd netatalk/pkg/3-0; git pull > /dev/null 2>&1; make $BRANCH $NOTAG"
85 }
86
87 solaris11e() {
88     print_os "Solaris 11 Express"
89     cd /export/home/ralph/netatalk/pkg/3-0; git pull > /dev/null 2>&1; gmake $BRANCH $NOTAG
90 }
91
92 openbsd5
93
94 exit 0
95
96 solaris10_sparc
97 freebsd8_x86
98 solaris10_x86
99 solaris11e
100 linux_x64
101