-
Notifications
You must be signed in to change notification settings - Fork 119
/
reinstall_istore.sh
27 lines (21 loc) · 982 Bytes
/
reinstall_istore.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
#!/bin/sh
## 安装iStore 参考 https://github.com/linkease/istore
opkg update
ISTORE_REPO=https://istore.linkease.com/repo/all/store
FCURL="curl --fail --show-error"
curl -V >/dev/null 2>&1 || {
echo "prereq: install curl"
opkg info curl | grep -Fqm1 curl || opkg update
opkg install curl
}
IPK=$($FCURL "$ISTORE_REPO/Packages.gz" | zcat | grep -m1 '^Filename: luci-app-store.*\.ipk$' | sed -n -e 's/^Filename: \(.\+\)$/\1/p')
[ -n "$IPK" ] || exit 1
$FCURL "$ISTORE_REPO/$IPK" | tar -xzO ./data.tar.gz | tar -xzO ./bin/is-opkg >/tmp/is-opkg
[ -s "/tmp/is-opkg" ] || exit 1
chmod 755 /tmp/is-opkg
/tmp/is-opkg update
# /tmp/is-opkg install taskd
/tmp/is-opkg opkg install --force-reinstall luci-lib-taskd luci-lib-xterm
/tmp/is-opkg opkg install --force-reinstall luci-app-store || exit $?
[ -s "/etc/init.d/tasks" ] || /tmp/is-opkg opkg install --force-reinstall taskd
[ -s "/usr/lib/lua/luci/cbi.lua" ] || /tmp/is-opkg opkg install luci-compat >/dev/null 2>&1