From b435a36ee432a39415ffb7b2fcdada6faa213767 Mon Sep 17 00:00:00 2001 From: YekongTAT Date: Sun, 8 Jan 2023 20:56:36 +0800 Subject: [PATCH] =?UTF-8?q?downPath=20=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分奇怪的系统可能没有 `/usr/local` 目录,如果目录不存在就把 `nexttrace` 放到 `/usr/local` --- nt_install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nt_install.sh b/nt_install.sh index 16331f0..6f8b9cb 100644 --- a/nt_install.sh +++ b/nt_install.sh @@ -32,7 +32,14 @@ checkSystemDistribution() { case "$OSTYPE" in linux*) osDistribution="linux" + + if [ ! -d "/usr/local" ]; + then + downPath="/usr/bin/nexttrace" + else downPath="/usr/local/bin/nexttrace" + fi + ;; *) echo "unknown: $OSTYPE" @@ -113,7 +120,7 @@ changeMode() { runBinrayFileHelp() { if [ -e ${downPath} ]; then ${downPath} -V - echo -e "${Tips} 一切准备就绪!使用命令 nexttrace 1.1.1.1 开始您的第一次路由测试吧~ 更多进阶命令玩法可以用 nexttrace -h 查看哦\n 关于软件卸载,因为nexttrace是绿色版单文件,卸载只需输入命令 rm /usr/local/bin/nexttrace 即可" + echo -e "${Tips} 一切准备就绪!使用命令 nexttrace 1.1.1.1 开始您的第一次路由测试吧~ 更多进阶命令玩法可以用 nexttrace -h 查看哦\n 关于软件卸载,因为nexttrace是绿色版单文件,卸载只需输入命令 rm ${downPath} 即可" fi }