forked from nikkinikki-org/OpenWrt-nikki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
35 lines (27 loc) · 735 Bytes
/
Copy pathinstall.sh
File metadata and controls
35 lines (27 loc) · 735 Bytes
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
#!/bin/sh
# MihomoTProxy's installer
# check env
if [[ ! -x "/bin/opkg" || ! -x "/sbin/fw4" ]]; then
echo "only supports OpenWrt build with firewall4!"
exit 1
fi
# include openwrt_release
. /etc/openwrt_release
# update feeds
echo "update feeds"
opkg update
# download tarball
echo "download tarball"
tarball="mihomo_$DISTRIB_ARCH.tar.gz"
curl -s -L -o "$tarball" "https://mirror.ghproxy.com/https://github.com/morytyann/OpenWrt-mihomo/releases/latest/download/$tarball"
# extract tarball
echo "extract tarball"
tar -x -z -f "$tarball"
rm -f "$tarball"
# install ipks
echo "install ipks"
opkg install mihomo_*.ipk
opkg install luci-app-mihomo_*.ipk
opkg install luci-i18n-mihomo-zh-cn_*.ipk
rm -f *mihomo*.ipk
echo "success"