Skip to content

Commit 80a34ba

Browse files
authored
Create nsk.sh
1 parent 851a281 commit 80a34ba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

nsk.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
MENU_URL="$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/NodeSeekDev/NodeScriptKit/releases/latest)"
3+
MENU_VERSION="${MENU_URL##*/}"
4+
if [ "$MENU_VERSION" != "$(cat /etc/nsk/version)" ] ; then
5+
echo "检测到有新版本可以更新,是否升级?[y/N]"
6+
read -r ans
7+
if [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then
8+
bash <(curl -Ls https://raw.githubusercontent.com/NodeSeekDev/NodeScriptKit/refs/heads/main/install.sh)
9+
else
10+
echo "已取消升级"
11+
fi
12+
fi
13+
nskCore -config /etc/nsk/config.toml

0 commit comments

Comments
 (0)