From 28fc496d6f9fede31d8aa960ceb5d809a1215129 Mon Sep 17 00:00:00 2001 From: wukongdaily <143675923+wukongdaily@users.noreply.github.com> Date: Sun, 15 Oct 2023 22:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E7=8B=AC=E5=AE=89?= =?UTF-8?q?=E8=A3=85iStore=E7=9A=84shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gl-inet.sh | 5 ++--- reinstall_istore.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 reinstall_istore.sh diff --git a/gl-inet.sh b/gl-inet.sh index 5cb4a2a..d72139b 100755 --- a/gl-inet.sh +++ b/gl-inet.sh @@ -25,9 +25,9 @@ install_istore() { uci set luci.main.mediaurlbase='/luci-static/argon' uci set luci.main.lang='zh_cn' uci commit - ##安装完毕之后 还原软件源 + ##安装完毕之后 还原软件源 setup_software_source 0 - + do_istore #升级iStore商店到最新版 is-opkg do_self_upgrade @@ -40,7 +40,6 @@ install_istore() { if ! grep -q " like iStoreOS" /tmp/sysinfo/model; then sed -i '1s/$/ like iStoreOS/' /tmp/sysinfo/model fi - } # 安装iStore 参考 https://github.com/linkease/istore do_istore() { diff --git a/reinstall_istore.sh b/reinstall_istore.sh new file mode 100644 index 0000000..db7892b --- /dev/null +++ b/reinstall_istore.sh @@ -0,0 +1,26 @@ +#!/bin/sh +## 安装iStore 参考 https://github.com/linkease/istore +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