-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathkuburan-repo.sh
executable file
·78 lines (63 loc) · 1.61 KB
/
kuburan-repo.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
#!/data/data/com.termux/files/usr/bin/sh
# Script untuk memasukkan external repo
# install beberapa tools pendukung
apt-get update
apt-get install --assume-yes gnupg coreutils curl
# buat folder source.list baru
APT_DIR=/data/data/com.termux/files/usr/etc/apt
if [ -z "${SOURCES_LIST}" ]; then
SOURCES_LIST="${APT_DIR}/sources.list.d"
fi
if [ ! -e "${SOURCES_LIST}" ]; then
mkdir -p "${SOURCES_LIST}"
fi
# Download signed key
PREFIX=/data/data/com.termux/files/usr
if [ -z "${TMPDIR}" ]; then
TMPDIR="${PREFIX}/tmp"
fi
if [ ! -e "${TMPDIR}" ]; then
mkdir -p "${TMPDIR}"
fi
curl -o "${TMPDIR}/pubkey.gpg" https://kuburan.github.io/pubkey.gpg
apt-key add "${TMPDIR}/pubkey.gpg"
rm -rf "${TMPDIR}/pubkey.gpg"
# masukkan external repo
aarch64_architecture()
{
printf "\ndeb [arch=all,aarch64] https://kuburan.github.io/files/ termux external" > "${SOURCES_LIST}/kuburan.list"
}
arm_architecture()
{
printf "\ndeb [arch=all] https://kuburan.github.io/files/ termux external" > "${SOURCES_LIST}/kuburan.list"
}
i686_architecture()
{
printf "\ndeb [arch=all] https://kuburan.github.io/files/ termux external" > "${SOURCES_LIST}/kuburan.list"
}
x86_64_architecture()
{
printf "\ndeb [arch=all] https://kuburan.github.io/files/ termux external" > "${SOURCES_LIST}/kuburan.list"
}
arch=`dpkg --print-architecture`
case "$arch" in
aarch64)
aarch64_architecture
;;
arm)
arm_architecture
;;
armhf)
arm_architecture
;;
i686)
i686_architecture
;;
x86_64)
x86_64_architecture
;;
esac
# update
apt-get update
echo "\nDone ..."
exit