-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCompileROM.sh
executable file
·51 lines (51 loc) · 1.39 KB
/
CompileROM.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
#Compile
if [[ $# = 1 ]]; then
. build/envsetup.sh
if [[ $? = 0 ]]; then
# Download Java 6 if necessary
if [ $(java -version 2>&1 | grep version | cut -f2 -d".") -gt 6 ] ; then
if [ ! -d ./jdk1.6.0_45 ]; then
wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin";
chmod +x jdk-6u45-linux-x64.bin;
./jdk-6u45-linux-x64.bin
fi
export JAVA_HOME=$(realpath ./jdk1.6.0_45);
fi
case $1 in
-u)
lunch full_kumquat-eng && make otapackage -j12;
;;
-ru)
lunch full_kumquat-userdebug && make otapackage -j12;
;;
-p)
lunch full_nypon-eng && make otapackage -j12;
;;
-rp)
lunch full_nypon-userdebug && make otapackage -j12;
;;
-s)
lunch full_pepper-eng && make otapackage -j12;
;;
-rs)
lunch full_pepper-userdebug && make otapackage -j12;
;;
-g)
lunch full_lotus-eng && make otapackage -j12;
;;
-rg)
lunch full_lotus-userdebug && make otapackage -j12;
;;
*)
echo "ERROR: Unknow option";
exit -1;
;;
esac
else
echo "ERROR: . build/envsetup.sh falied"
exit -1;
fi
else
echo "ERROR: Number of options not correct. Usage: ./CompileROM.sh -u | -p | -s | -g | -ru | -rp | -rs | -rg"
exit -1;
fi