source: trunk/build/run-bitten.sh @ 1965

Last change on this file since 1965 was 1965, checked in by sam, 6 years ago

build: add a script to automatically run bitten on Windows. Needs some tweaking
before it also runs on Linux or OS X.

File size: 1.8 KB
Line 
1#!/bin/sh
2
3conffile="`mktemp`"
4url="http://lol.zoy.org/builds"
5
6append() {
7  echo "$*" >> "$conffile"
8}
9
10#
11# Check for command line
12#
13
14if [ "$#" != 2 ]; then
15    echo "Usage: $0 <username> <password>"
16    exit 1
17fi
18
19#
20# Operating system information
21#
22
23append "[os]"
24append "name = `uname -srvmo`"
25append "version = 0"
26family="`uname -s | tr A-Z a-z`"
27case "$family" in
28  mingw*) family="windows" ;;
29  darwin*) family="osx" ;;
30esac
31append "family = $family"
32append "token = $RANDOM"
33append ""
34
35#
36# Hardware information
37#
38
39append "[machine]"
40name="`uname -n | tr A-Z a-z`"
41case "$name" in
42  d*e*s*o*v*) name="putois" ;;
43esac
44append "name = $name"
45processor="`uname -m`"
46case "$processor" in
47  x86_64) processor="amd64" ;;
48  i*86) processor="i386" ;;
49esac
50# Windows defines a lot of crazy shit,
51case "$PROCESSOR_ARCHITECTURE" in
52  amd64|AMD64) processor="amd64" ;;
53  x86|X86) processor="i386" ;;
54esac
55case "$PROCESSOR_ARCHITEW6432" in
56  amd64|AMD64) processor="amd64" ;;
57  x86|X86) processor="i386" ;;
58esac
59append "processor = $processor"
60append ""
61
62#
63# Authentication information
64#
65
66append "[authentication]"
67append "username = $1"
68append "password = $2"
69append ""
70
71#
72# Visual Studio configuration
73#
74
75# FIXME: we also need to check for the Visual Studio SDK
76append "[msvc]"
77if [ -n "$VS100COMNTOOLS" ]; then
78  append "version = 10"
79elif [ -n "$VS110COMNTOOLS" ]; then
80  append "version = 11"
81elif [ -n "$VS90COMNTOOLS" ]; then
82  append "version = 9"
83fi
84append ""
85
86#
87# Xbox development kit
88#
89
90append "[xdk]"
91if [ -n "$XEDK" ]; then
92  # FIXME: we don't know how to check the version
93  append "version = 2.0.20675.0"
94fi
95append ""
96
97#
98# PS3 development kit
99#
100
101append "[ps3sdk]"
102if [ -n "$SN_PS3_PATH" ]; then
103  append "version = 410"
104fi
105append ""
106
107#
108# Launch everything
109#
110
111while : ; do
112    bitten-slave "$url" -f "$conffile" --name "$name"
113    sleep 10
114done
115
116rm -f "$conffile"
117
Note: See TracBrowser for help on using the repository browser.