-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.sh
executable file
·67 lines (61 loc) · 927 Bytes
/
build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# options
: "${PROJECT:=game,cgame,ui}"
: "${TOOLS:=default}"
: "${DEBUG:=0}"
: "${FORCE32:=0}"
: "${NOSQL:=1}"
: "${NONOTIFY:=0}"
: "${NOCRASHHANDLER:=0}"
: "${NOGEOIP:=0}"
: "${USE_ASAN:=0}"
export NO_SSE="${NO_SSE:=1}"
build="scons -Q"
ARGS=("$@")
for ((i = 0; i < ${#ARGS[@]}; i++)); do
case ${ARGS[$i],,} in
"release")
DEBUG=0
;;
"debug")
DEBUG=1
;;
"fastdebug")
DEBUG=2
;;
"analyse")
build="scan-build \$build"
;;
"use_asan")
USE_ASAN=1
;;
"force32")
FORCE32=1
;;
"nosql")
NOSQL=1
;;
"nonotify")
NONOTIFY=1
;;
"nocrashhandler")
NOCRASHHANDLER=1
;;
"nogeoip")
NOGEOIP=1
;;
*) ;;
esac
done
$build \
"debug=$DEBUG" \
"force32=$FORCE32" \
"no_crashhandler=$NOCRASHHANDLER" \
"no_geoip=$NOGEOIP" \
"no_notify=$NONOTIFY" \
"no_sql=$NOSQL" \
"project=$PROJECT" \
"tools=$TOOLS" \
"use_asan=$USE_ASAN"