From 8a7be7e61c47de94d8d59b174e92d92ddb18050f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 8 Nov 2023 11:59:28 +0800 Subject: [PATCH] =?UTF-8?q?mac=20=E4=B8=8D=E5=88=A4=E6=96=ADroot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install.sh | 10 +++++----- scripts/install_dev.sh | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index b79e72c4f..6955086e7 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -15,11 +15,6 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" -if [ "$EUID" -ne 0 ] - then echo "Please run as root!" - exit -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "openSUSE" /etc/*-release; then @@ -58,6 +53,11 @@ else OSNAME='unknow' fi +if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then + echo "Please run as root!" + exit +fi + # HTTP_PREFIX="https://" # LOCAL_ADDR=common diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 17ca7274e..b0ce3f915 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -19,11 +19,6 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" -if [ "$EUID" -ne 0 ] - then echo "Please run as root!" - exit -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' @@ -62,6 +57,10 @@ else OSNAME='unknow' fi +if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then + echo "Please run as root!" + exit +fi # HTTP_PREFIX="https://" # LOCAL_ADDR=common