File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ cd /tmp
5151temp_dir=$( mktemp -d)
5252curl -sLo - $temp_download_file " https://github.com/NodeSeekDev/NodeScriptKit/archive/refs/tags/$MENU_VERSION .tar.gz" | \
5353 tar -xzv -C $temp_dir
54- cp $temp_dir /* /menu.toml /etc/nsk/config.toml
54+ [ -f " /etc/nsk/config.toml " ] || cp $temp_dir /* /menu.toml /etc/nsk/config.toml
5555rm -rf /etc/nsk/modules.d/default/* # Remove old scripts to prevent conflicts
5656cp $temp_dir /* /modules.d/* /etc/nsk/modules.d/default/
5757
@@ -61,4 +61,6 @@ cp $temp_dir/*/nsk.sh /usr/bin/nsk
6161chmod u+x /usr/bin/nsk
6262[ -f " /usr/bin/n" ] || ln -s /usr/bin/nsk /usr/bin/n
6363
64+ rm -rf $temp_dir
65+
6466echo -e " \e[1;32mnsk脚本安装成功啦,可以输入n或者nsk命令唤出菜单\e[0m"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if [ -n "$MENU_VERSION" ] && \
77 echo " 检测到有新版本可以更新,是否升级?[y/N]"
88 read -r ans
99 if [ " $ans " = " y" ] || [ " $ans " = " Y" ]; then
10- bash <( curl -Ls https://raw.githubusercontent.com/NodeSeekDev/NodeScriptKit/refs/heads/main/install.sh)
10+ bash <( curl -Ls https://raw.githubusercontent.com/NodeSeekDev/NodeScriptKit/refs/heads/main/install.sh) && exit
1111 else
1212 echo " 已取消升级"
1313 fi
You can’t perform that action at this time.
0 commit comments