small-package/luci-app-systools/root/usr/share/systools/istore-reinstall.run

26 lines
906 B
Plaintext
Raw Normal View History

2023-01-23 20:18:39 +08:00
#!/bin/sh
2023-03-12 16:22:02 +08:00
ISTORE_REPO=https://istore.linkease.com/repo/all/store
FCURL="curl --fail --show-error"
2023-01-23 20:18:39 +08:00
2023-03-12 16:22:02 +08:00
curl -V >/dev/null 2>&1 || {
echo "prereq: install curl"
opkg info curl | grep -Fqm1 curl || opkg update
opkg install curl
2023-01-23 20:18:39 +08:00
}
2023-03-12 16:22:02 +08:00
IPK=`$FCURL "$ISTORE_REPO/Packages.gz" | zcat | grep -m1 '^Filename: luci-app-store.*\.ipk$' | sed -n -e 's/^Filename: \(.\+\)$/\1/p'`
2023-01-23 20:18:39 +08:00
2023-03-12 16:22:02 +08:00
[ -n "$IPK" ] || exit 1
2023-01-23 20:18:39 +08:00
2023-03-12 16:22:02 +08:00
$FCURL "$ISTORE_REPO/$IPK" | tar -xzO ./data.tar.gz | tar -xzO ./bin/is-opkg > /tmp/is-opkg
2023-01-23 20:18:39 +08:00
2023-03-12 16:22:02 +08:00
[ -s "/tmp/is-opkg" ] || exit 1
2023-01-23 20:18:39 +08:00
2023-03-12 16:22:02 +08:00
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
2023-03-12 23:35:24 +08:00
/tmp/is-opkg opkg install --force-reinstall luci-app-store || exit $?
2023-03-12 16:22:02 +08:00
[ -s "/etc/init.d/tasks" ] || /tmp/is-opkg opkg install --force-reinstall taskd
2023-03-12 23:35:24 +08:00
[ -s "/usr/lib/lua/luci/cbi.lua" ] || /tmp/is-opkg opkg install luci-compat >/dev/null 2>&1