-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustomize.sh
93 lines (87 loc) · 2.71 KB
/
customize.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
#!/system/bin/sh
# Systemless Hosts by the open source loving GL-DP and all contributors;
# Consolidating and extending hosts files from several well-curated sources.
#
# set permissions to executables
chmod 0755 $MODPATH/host-installer/curl
install_hosts() {
. $MODPATH/addon/install.sh
ui_print " Install Unified Hosts (UH)?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Change"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uh.sh
else
ui_print " Install UH + fakenews?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Change"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhf.sh
else
ui_print " Install UH + fakenews + gambling?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Change"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhfg.sh
else
ui_print " Install UH + fakenews + gambling + social?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Change"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhfgs.sh
else
ui_print " Install UH + fakenews + gambling + porn?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Change"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhfgp.sh
else
ui_print " Install UH + fakenews + gambling + porn + social?"
ui_print " "
ui_print " Vol+ = Select"
ui_print " Vol- = Exit"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhfgps.sh
else
ui_print "- Exiting"
fi
fi
fi
fi
fi
fi
}
patch_hosts() {
PATH=/system/etc
ui_print "- Patching hosts file"
mkdir -p $MODPATH$PATH
mv -f $MODPATH/hosts $MODPATH$PATH
}
cleanup() {
rm -rf $MODPATH/LICENSE
rm -rf $MODPATH/addon 2>/dev/null
rm -f $MODPATH/install.sh 2>/dev/null
}
run_install() {
unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2
ui_print " "
ui_print "- Installing hosts"
install_hosts
patch_hosts
ui_print " "
ui_print "- Cleaning up"
cleanup
ui_print " "
}
run_install