-
Notifications
You must be signed in to change notification settings - Fork 4
/
Start-BuildServer.sh
executable file
·45 lines (40 loc) · 2.34 KB
/
Start-BuildServer.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
45
#!/usr/bin/env bash
# Launch the Build Server.
# This script must be run on the Build Server machine.
# You first need to copy BuildServer.tar to that machine. Then
# untar it with
# tar -xf BuildServer.tar
# Then run this script
# The output log will be written in the directory where the script is run
cd /home/appinventor/Desktop/App-Inventor-2-VM-Sources/Code
EXECUTE=true
LAUNCH_BUILDSERVER_OPT=
LAUNCH_BUILDSERVER_LOG_PATH="../buildserver-log.out"
while true; do
case "$1" in
-c | --childProcessRamMb )
LAUNCH_BUILDSERVER_OPT="$LAUNCH_BUILDSERVER_OPT --childProcessRamM $2"; shift 2 ;;
-m | --maxSimultaneousBuilds )
LAUNCH_BUILDSERVER_OPT="$LAUNCH_BUILDSERVER_OPT --maxSimultaneousBuilds $2"; shift 2 ;;
-p | --port)
LAUNCH_BUILDSERVER_OPT="$LAUNCH_BUILDSERVER_OPT --port $2"; shift 2;;
-r | --requiredHosts )
LAUNCH_BUILDSERVER_OPT="$LAUNCH_BUILDSERVER_OPT --requiredHosts $2"; shift 2;;
-d | --debug )
LAUNCH_BUILDSERVER_OPT="$LAUNCH_BUILDSERVER_OPT --debug $2"; shift 2;;
-l | --logPath )
LAUNCH_BUILDSERVER_LOG_PATH=$2; shift 2;;
-h | --help )
echo "Usage: [-c , --childProcessRamM ] [-m , --maxSimultaneousBuilds ] [-p , --port ] [-r , --requiredHosts ] [-d , --debug ] [-l , --logPath (ie. /home/buildserver/buildserver-log.out) ]"; EXECUTE=false; break ;;
-- ) EXECUTE=false; break ;;
- ) EXECUTE=false; break ;;
* ) break ;;
esac
done
if $EXECUTE; then
cd lib;
# Revised 10/24 to add updated jackson and guava libs
# Revised 10/25 to add commons-io-2.0.1.jar
# Revised 07/03 to add bcprov-jdk15on-149.jar and bcpkix-jdk15on-149.jar:sdklib.jar to support Android SDK 4.2.2
exec nohup java -Xmx1828m -cp activation-1.1.jar:jersey-bundle-1.3.jar:args4j-2.0.18.jar:jersey-multipart-1.3.jar:asm-3.1.jar:jettison-1.1.jar:BuildServer.jar:json.jar:CommonUtils.jar:jsr311-api-1.1.1.jar:CommonVersion.jar:localizer.jar:FastInfoset-1.2.2.jar:mail-1.4.jar:grizzly-servlet-webserver-1.9.18-i.jar:commons-io-2.0.1.jar:guava-14.0.1.jar:rome-0.9.jar:http-20070405.jar:bcprov-jdk15on-149.jar:bcpkix-jdk15on-149.jar:sdklib.jar:jackson-core-asl-1.9.4.jar:stax-api-1.0-2.jar:jaxb-api-2.1.jar:wadl2java.jar:jaxb-impl-2.1.10.jar:wadl-cmdline.jar:jaxb-xjc.jar:wadl-core.jar:jdom-1.0.jar -Dfile.encoding=UTF-8 com.google.appinventor.buildserver.BuildServer $LAUNCH_BUILDSERVER_OPT &> $LAUNCH_BUILDSERVER_LOG_PATH &
fi