From 529f9475ddbec5cccd757b5508e3769cd8f8d8c7 Mon Sep 17 00:00:00 2001 From: zhao Date: Tue, 7 Jan 2025 23:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=20Script/iStoreOS/install?= =?UTF-8?q?.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- Script/iStoreOS/install.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Script/iStoreOS/install.sh diff --git a/ Script/iStoreOS/install.sh b/ Script/iStoreOS/install.sh new file mode 100644 index 0000000..e25d169 --- /dev/null +++ b/ Script/iStoreOS/install.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# 安装iStore 参考 https://github.com/linkease/istore +do_istore() { + echo "do_istore method==================>" + # 换源 + ISTORE_REPO=https://istore.istoreos.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 + # 换源 + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /bin/is-opkg + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /etc/opkg/compatfeeds.conf + sed -i 's/istore.linkease.com/istore.istoreos.com/g' /www/luci-static/istore/index.js +} + +do_istore \ No newline at end of file