因未使用root而终止安装时,安装脚本需返回非0值

```bash
: && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
:                                           ^^
:                                           脚本返回非0值,后续命令不应继续执行
```
This commit is contained in:
A7T 2021-06-26 15:34:00 +08:00
parent 35e998e697
commit a1213e148e
2 changed files with 2 additions and 2 deletions

View File

@ -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】代表在线地址

View File

@ -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】代表在线地址