From 4f0d5a33a12c2493f1c963a5e7412a927aaa8daf Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 2 Jul 2021 21:57:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=BF=AB=E6=8D=B7=E6=96=B9=E5=BC=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 501a5f5..0e50f30 100644 --- a/install.sh +++ b/install.sh @@ -3368,16 +3368,26 @@ aliasInstall() { if [[ -f "$HOME/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && grep <$HOME/install.sh -q "作者:mack-a"; then mv "$HOME/install.sh" /etc/v2ray-agent/install.sh - if [[ -d "/usr/bin/" ]] && [[ ! -f "/usr/bin/vasma" ]]; then - ln -s /etc/v2ray-agent/install.sh /usr/bin/vasma - chmod 700 /usr/bin/vasma + local vasmaType= + if [[ -d "/usr/bin/" ]] ; then + if [[ ! -f "/usr/bin/vasma" ]];then + ln -s /etc/v2ray-agent/install.sh /usr/bin/vasma + chmod 700 /usr/bin/vasma + vasmaType=true + fi + rm -rf "$HOME/install.sh" - elif [[ -d "/usr/sbin" ]] && [[ ! -f "/usr/sbin/vasma" ]]; then - ln -s /etc/v2ray-agent/install.sh /usr/sbin/vasma - chmod 700 /usr/sbin/vasma + elif [[ -d "/usr/sbin" ]] ; then + if [[ ! -f "/usr/sbin/vasma" ]];then + ln -s /etc/v2ray-agent/install.sh /usr/sbin/vasma + chmod 700 /usr/sbin/vasma + vasmaType=true + fi rm -rf "$HOME/install.sh" fi - echoContent green "快捷方式创建成功,可执行[vasma]重新打开脚本" + if [[ "${vasmaType}" == "true" ]];then + echoContent green "快捷方式创建成功,可执行[vasma]重新打开脚本" + fi fi }