mac 不判断root

pull/504/head
Mr Chen 2 years ago
parent e73533b611
commit 8a7be7e61c
  1. 10
      scripts/install.sh
  2. 9
      scripts/install_dev.sh

@ -15,11 +15,6 @@ startTime=`date +%s`
_os=`uname` _os=`uname`
echo "use system: ${_os}" echo "use system: ${_os}"
if [ "$EUID" -ne 0 ]
then echo "Please run as root!"
exit
fi
if [ ${_os} == "Darwin" ]; then if [ ${_os} == "Darwin" ]; then
OSNAME='macos' OSNAME='macos'
elif grep -Eqi "openSUSE" /etc/*-release; then elif grep -Eqi "openSUSE" /etc/*-release; then
@ -58,6 +53,11 @@ else
OSNAME='unknow' OSNAME='unknow'
fi fi
if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then
echo "Please run as root!"
exit
fi
# HTTP_PREFIX="https://" # HTTP_PREFIX="https://"
# LOCAL_ADDR=common # LOCAL_ADDR=common

@ -19,11 +19,6 @@ startTime=`date +%s`
_os=`uname` _os=`uname`
echo "use system: ${_os}" echo "use system: ${_os}"
if [ "$EUID" -ne 0 ]
then echo "Please run as root!"
exit
fi
if [ ${_os} == "Darwin" ]; then if [ ${_os} == "Darwin" ]; then
OSNAME='macos' OSNAME='macos'
@ -62,6 +57,10 @@ else
OSNAME='unknow' OSNAME='unknow'
fi fi
if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then
echo "Please run as root!"
exit
fi
# HTTP_PREFIX="https://" # HTTP_PREFIX="https://"
# LOCAL_ADDR=common # LOCAL_ADDR=common

Loading…
Cancel
Save