-
Notifications
You must be signed in to change notification settings - Fork 1
/
BuildRR-F(s).sh
200 lines (159 loc) · 8.67 KB
/
BuildRR-F(s).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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Build script to compile Resurrection Remix ROM
# No scrollback buffer
echo -e '\0033\0143'
# Get intial time of script startup
res1=$(date +%s.%N)
# Specify colors for shell
red='tput setaf 1' # red
green='tput setaf 2' # green
yellow='tput setaf 3' # yellow
blue='tput setaf 4' # blue
violet='tput setaf 5' # violet
cyan='tput setaf 6' # cyan
white='tput setaf 7' # white
txtbld=$(tput bold) # Bold
bldred=${txtbld}$(tput setaf 1) # Bold red
bldgrn=${txtbld}$(tput setaf 2) # Bold green
bldblu=${txtbld}$(tput setaf 4) # Bold blue
bldcya=${txtbld}$(tput setaf 6) # Bold cyan
normal='tput sgr0'
tput bold
tput setaf 1
clear
echo -e ""
echo -e ""
echo -e " ( ( ( ( ( ) ) "
echo -e " )\ ) )\ ) )\ ) )\ ) ( * ) )\ ) ( /( ( /( "
echo -e " (()/( ( (()/( ( (()/((()/( ( )\ ) /((()/( )\()) )\()) "
echo -e " /(_)))\ /(_)) )\ /(_))/(_)))\ (((_) ( )(_))/(_))((_)\ ((_)\ "
echo -e " (_)) ((_) (_)) _ ((_)(_)) (_)) ((_) )\___ (_(_())(_)) ((_) _((_) "
echo -e " | _ \| __|/ __|| | | || _ \| _ \| __|((/ __||_ _||_ _| / _ \ | \| | "
echo -e " | /| _| \__ \| |_| || /| /| _| | (__ | | | | | (_) || . | "
echo -e " |_|_\|___||___/ \___/ |_|_\|_|_\|___| \___| |_| |___| \___/ |_|\_| "
echo -e ""
echo -e ""
echo -e " ( * ( ) "
echo -e " )\ ) ( )\ ) ( /( "
echo -e " (()/( ( )\))( (()/( )\()) "
echo -e " /(_)))\ ((_)()\ /(_))((_)\ "
echo -e " (_)) ((_) (_()((_)(_)) __((_) "
echo -e " | _ \| __|| \/ ||_ _| \ \/ / "
echo -e " | /| _| | |\/| | | | > < "
echo -e " |_|_\|___||_| |_||___| /_/\_\ "
echo -e ""
echo -e ""
echo -e ""
echo -e ""
sleep 3s
# Clear terminal
clear
# Confirm 'make clean'
echo -e "\n\n${bldgrn} Do you want to make clean?\n"
echo ""
echo -e "${bldblu} 1. Yes"
echo -e "${bldblu} 2. No"
echo ""
echo ""
$normal
read askclean
if [ "$askclean" == "3" ]
then
echo ""
echo ""
echo -e "${bldred} Compilation will continue after cleaning previous build files... "
echo ""
echo ""
else
echo ""
echo ""
echo -e "${bldred} ROM will be compiled without cleaning previous build files... "
echo ""
echo ""
fi
sleep 2s
# Clear terminal
clear
if [ "$askclean" == "1" ]
then
echo ""
echo ""
echo -e "${bldgrn} Removing files from previous compilations - Cleaning... "
echo ""
echo ""
$normal
make clobber
fi
# Clear terminal
clear
# Setup environment
echo -e ""
echo -e ""
echo -e "${bldgrn} Setting up build environment..."
echo -e ""
echo -e ""
$normal
. build/envsetup.sh
# Clear terminal
clear
# Lunch device
echo -e ""
echo -e ""
echo -e "${bldcya} Choose your device from the lunch menu..."
echo -e ""
echo -e ""
$normal
$green
lunch
# Clear terminal
clear
# Start compilation
echo -e ""
echo -e ""
echo -e "${bldcya} Starting compilation of Resurrection Remix ROM..."
echo -e ""
echo -e ""
$normal
mka bacon
echo -e ""
# Get elapsed time
$blue
res2=$(date +%s.%N)
echo -e ""
echo -e ""
echo "${bldgrn}Total time elapsed: ${txtrst}${grn}$(echo "($res2 - $res1) / 60"|bc ) minutes ($(echo "$res2 - $res1"|bc ) seconds) ${txtrst}"
echo -e ""
echo -e ""
# Compilation complete
tput bold
tput setaf 1
clear
echo -e " "
echo -e "█████████████████████████████████████████████████████████████"
echo -e "█░░░░░░██░░░░░░█░░░░░░░░░░░░░░█░░░░░░██░░░░░░█░░░░░░░░░░░░░░█"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░█████████"
echo -e "█░░▄▀░░░░░░▄▀░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█"
echo -e "█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░█"
echo -e "█░░▄▀░░░░░░▄▀░░█░░▄▀░░░░░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░█"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀░░▄▀▄▀░░█░░▄▀░░█████████"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░█░░░░▄▀▄▀▄▀░░░░█░░▄▀░░░░░░░░░░█"
echo -e "█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░███░░░░▄▀░░░░███░░▄▀▄▀▄▀▄▀▄▀░░█"
echo -e "█░░░░░░██░░░░░░█░░░░░░██░░░░░░█████░░░░░░█████░░░░░░░░░░░░░░█"
echo -e "█████████████████████████████████████████████████████████████"
echo -e "█████████████████████████████████████████████████████████████"
echo -e "█░░░░░░░░░░░░░░█░░░░░░██░░░░░░█░░░░░░██████████░░░░░░█░░░░░░█"
echo -e "█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░░░░░██░░▄▀░░█░░▄▀░░█"
echo -e "█░░▄▀░░░░░░░░░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀░░█░░▄▀░░█"
echo -e "█░░▄▀░░█████████░░▄▀░░██░░▄▀░░█░░▄▀░░░░░░▄▀░░██░░▄▀░░█░░▄▀░░█"
echo -e "█░░▄▀░░░░░░░░░░█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░▄▀░░█"
echo -e "█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░▄▀░░█"
echo -e "█░░▄▀░░░░░░░░░░█░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░██░░▄▀░░█░░░░░░█"
echo -e "█░░▄▀░░█████████░░▄▀░░██░░▄▀░░█░░▄▀░░██░░▄▀░░░░░░▄▀░░████████"
echo -e "█░░▄▀░░█████████░░▄▀░░░░░░▄▀░░█░░▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░█░░░░░░█"
echo -e "█░░▄▀░░█████████░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░░░░░░░░░▄▀░░█░░▄▀░░█"
echo -e "█░░░░░░█████████░░░░░░░░░░░░░░█░░░░░░██████████░░░░░░█░░░░░░█"
echo -e "█████████████████████████████████████████████████████████████"
echo -e " "
# Switch terminal back to normal
$normal