Skip to content

Commit 5e27d3e

Browse files
committed
update install.sh and nsk.sh
1 parent 421771d commit 5e27d3e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cd /tmp
5151
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
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
5555
rm -rf /etc/nsk/modules.d/default/* # Remove old scripts to prevent conflicts
5656
cp $temp_dir/*/modules.d/* /etc/nsk/modules.d/default/
5757

@@ -61,4 +61,6 @@ cp $temp_dir/*/nsk.sh /usr/bin/nsk
6161
chmod 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+
6466
echo -e "\e[1;32mnsk脚本安装成功啦,可以输入n或者nsk命令唤出菜单\e[0m"

nsk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)