|
|
@ -94,9 +94,12 @@ fi |
|
|
|
echo "use system version: ${OSNAME}" |
|
|
|
echo "use system version: ${OSNAME}" |
|
|
|
|
|
|
|
|
|
|
|
if [ "${OSNAME}" == "macos" ];then |
|
|
|
if [ "${OSNAME}" == "macos" ];then |
|
|
|
USER=$(who | sed -n "2,1p" |awk '{print $1}') |
|
|
|
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") |
|
|
|
DEV="/Users/${USER}/Desktop/mwdev" |
|
|
|
HTTP_PREFIX="https://" |
|
|
|
cd $DEV && bash scripts/install/${OSNAME}.sh |
|
|
|
if [ ! -z "$cn" ];then |
|
|
|
|
|
|
|
HTTP_PREFIX="https://ghproxy.com/" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
curl -fsSL ${HTTP_PREFIX}https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/install/macos.sh | bash |
|
|
|
else |
|
|
|
else |
|
|
|
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh |
|
|
|
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh |
|
|
|
fi |
|
|
|
fi |
|
|
|