From a1213e148e71ac6ab67e8e1f8789d06b9de673c2 Mon Sep 17 00:00:00 2001 From: A7T Date: Sat, 26 Jun 2021 15:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A0=E6=9C=AA=E4=BD=BF=E7=94=A8root?= =?UTF-8?q?=E8=80=8C=E7=BB=88=E6=AD=A2=E5=AE=89=E8=A3=85=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC=E9=9C=80=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=9D=9E0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```bash : && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null : ^^ : 脚本返回非0值,后续命令不应继续执行 ``` --- install.sh | 2 +- install_n.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 380841f..f45fa2e 100644 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ if [ "$USER" != "root" -a -z "$systype" ];then $echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m" echo ----------------------------------------------- read -p "仍要安装?可能会产生未知错误!(1/0) > " res - [ "$res" != "1" ] && exit + [ "$res" != "1" ] && exit 1 fi webget(){ #参数【$1】代表下载目录,【$2】代表在线地址 diff --git a/install_n.sh b/install_n.sh index 380841f..f45fa2e 100644 --- a/install_n.sh +++ b/install_n.sh @@ -18,7 +18,7 @@ if [ "$USER" != "root" -a -z "$systype" ];then $echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m" echo ----------------------------------------------- read -p "仍要安装?可能会产生未知错误!(1/0) > " res - [ "$res" != "1" ] && exit + [ "$res" != "1" ] && exit 1 fi webget(){ #参数【$1】代表下载目录,【$2】代表在线地址