forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·50 lines (42 loc) · 1.07 KB
/
build.sh
File metadata and controls
executable file
·50 lines (42 loc) · 1.07 KB
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
#!/usr/bin/env bash
function print_help() {
cat <<-EOF
build [build-type] [cpu-type]
build-type
help (show this message)
all (builds release versions)
debug (builds arm debug version by default)
release (builds arm release version by default)
cpu-type
arm (default)
arm64
x86
x64
EOF
}
if [ "$1" == 'help' ]; then
print_help
exit 1;
fi
if [ "$1" == 'all' ]; then
echo 'Building all releases'
autoninja -C out/release_arm chrome_public_apk;
autoninja -C out/release_arm64 chrome_public_apk;
autoninja -C out/release_x86 chrome_public_apk;
autoninja -C out/release_x64 chrome_public_apk;
exit 1;
fi
if [ "$1" != "debug" -a "$1" != "release" ]; then
echo "Parameter 1 must be either debug or release"
exit 1;
fi
# if no second parameter provided then default to arm build
if [ $# -eq 1 ]; then
autoninja -C out/$1_arm;
exit 1;
fi
if [ "$2" != "arm" -a "$2" != "arm64" -a "$2" != "x86" -a "$2" != "x64" ]; then
echo "Parameter 2 must be arm, arm64, x86 or x64"
exit 1;
fi
autoninja -C out/$1_$2;