Skip to content

Commit 4d783e1

Browse files
authored
Update install.sh
1 parent 1a4f4a6 commit 4d783e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

install.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
2-
# 获取当前操作系统和架构
3-
goos=$(uname -s | tr '[:upper:]' '[:lower:]') # 获取操作系统
4-
goarch=$(uname -m) # 获取架构
2+
# 功能: NodeScriptKit 安装和更新脚本
3+
4+
goos=$(uname -s | tr '[:upper:]' '[:lower:]')
5+
goarch=$(uname -m)
56

67
echo "Current OS: $goos"
78
echo "Current Architecture: $goarch"
@@ -35,7 +36,6 @@ curl -Lso /usr/bin/nskCore $BIN_URL
3536
chmod u+x /usr/bin/nskCore
3637

3738
if tar --version 2>&1 | grep -qi 'busybox'; then
38-
# 检查是否存在 apk 命令(Alpine 包管理器)
3939
if command -v apk >/dev/null 2>&1; then
4040
apk add --no-cache tar
4141
fi
@@ -52,6 +52,7 @@ temp_dir=$(mktemp -d)
5252
curl -sLo - $temp_download_file "https://github.com/NodeSeekDev/NodeScriptKit/archive/refs/tags/$MENU_VERSION.tar.gz" | \
5353
tar -xzv -C $temp_dir
5454
cp $temp_dir/*/menu.toml /etc/nsk/config.toml
55+
rm -rf /etc/nsk/modules.d/default/* # Remove old scripts to prevent conflicts
5556
cp $temp_dir/*/modules.d/* /etc/nsk/modules.d/default/
5657

5758
echo $MENU_VERSION > /etc/nsk/version

0 commit comments

Comments
 (0)