因未使用root而终止安装时,安装脚本需返回非0值
```bash : && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null : ^^ : 脚本返回非0值,后续命令不应继续执行 ```
This commit is contained in:
@@ -18,7 +18,7 @@ if [ "$USER" != "root" -a -z "$systype" ];then
|
|||||||
$echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m"
|
$echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
read -p "仍要安装?可能会产生未知错误!(1/0) > " res
|
read -p "仍要安装?可能会产生未知错误!(1/0) > " res
|
||||||
[ "$res" != "1" ] && exit
|
[ "$res" != "1" ] && exit 1
|
||||||
fi
|
fi
|
||||||
webget(){
|
webget(){
|
||||||
#参数【$1】代表下载目录,【$2】代表在线地址
|
#参数【$1】代表下载目录,【$2】代表在线地址
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ if [ "$USER" != "root" -a -z "$systype" ];then
|
|||||||
$echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m"
|
$echo "\033[31m请尽量使用root用户(不要直接使用sudo命令!)执行安装!\033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
read -p "仍要安装?可能会产生未知错误!(1/0) > " res
|
read -p "仍要安装?可能会产生未知错误!(1/0) > " res
|
||||||
[ "$res" != "1" ] && exit
|
[ "$res" != "1" ] && exit 1
|
||||||
fi
|
fi
|
||||||
webget(){
|
webget(){
|
||||||
#参数【$1】代表下载目录,【$2】代表在线地址
|
#参数【$1】代表下载目录,【$2】代表在线地址
|
||||||
|
|||||||
Reference in New Issue
Block a user