-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sh
142 lines (121 loc) · 2.58 KB
/
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/bin/bash
#
# Copyright (C) 2020 RB INTERNATIONAL NETWORK
#
# An Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
BOLD='\033[1m'
GRN='\033[01;32m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
RED='\033[01;31m'
RST='\033[0m'
ROM_ZIP_DIR=""
ROM_DIR=""
function options(){
if [ $1 -eq 1 ]
then
chmod +x env.sh;
bash env.sh;
start;
elif [ $1 -eq 2 ]
then
chmod +x env.sh;
chmod +x git.sh;
./git.sh;
./env.sh;
start;
elif [ $1 -eq 3 ]
then
chmod +x git.sh;
bash git.sh;
start;
elif [ $1 -eq 4 ]
then
chmod +x sync.sh;
bash sync.sh;
start;
elif [ $1 -eq 5 ]
then
chmod +x init.sh;
bash init.sh;
start;
elif [ $1 -eq 6 ]
then
chmod +x build_rom.sh;
bash build_rom.sh;
start;
elif [ $1 -eq 7 ]
then
chmod +x error.sh;
bash error.sh;
start;
elif [ $1 -eq 8 ]
then
chmod +x upload.sh;
bash upload.sh;
start;
elif [ $1 -eq 9 ]
then
sudo apt -y install python3;
python3 gsi.py;
start;
elif [ $1 -eq 10 ]
then
chmod +x volte.sh;
bash volte.sh;
start;
elif [ $1 -eq 11 ]
then
chmod +x sefix.sh;
bash sefix.sh
start;
elif [ $1 -eq 12 ]
then
chmod +x obb.sh;
bash obb.sh
start;
elif [ $1 -eq 13 ]
then
exit;
fi
}
function start(){
echo -e "${CYAN}"
echo "<<<<< © RB INTERNATIONAL NETWORK™ >>>>>"
echo -e "${RED}"
echo "----------------------------------------"
echo "Welcome to ANDROID ROM BUILDING SCRIPTS"
echo "----------------------------------------"
sleep 2;
echo -e "${YELLOW}"
echo "1 -- Build ENV necessary packages"
echo "2 -- All env essentials (env and git)"
echo "3 -- Setup git"
echo "4 -- Sync a rom source"
echo "5 -- Initialize device repos"
echo "6 -- Build rom"
echo "7 -- Show build error"
echo "8 -- Upload rom"
echo "9 -- Build sGSI"
echo "10 -- Apply VoLTE patches for MediaTek"
echo "11 -- Fix selinux for realme mtk devices"
echo "12 -- Apply changes to make obb visible"
echo "13 -- Exit"
echo -e "${RST}"
read -p "Enter choice: " n;
options $n;
}
start;