This commit is contained in:
midoks
2023-02-15 22:24:46 +08:00
parent 39653896bf
commit 3f40ed0a01
2 changed files with 16 additions and 4 deletions
+10 -1
View File
@@ -106,7 +106,16 @@ fi
echo "use system version: ${OSNAME}"
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh
if [ "${OSNAME}" == "macos" ];then
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
if [ ! -z "$cn" ];then
HTTP_PREFIX="https://ghproxy.com/"
fi
else
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh
fi
if [ "${OSNAME}" == "macos" ];then
echo "macos end"
+6 -3
View File
@@ -94,9 +94,12 @@ fi
echo "use system version: ${OSNAME}"
if [ "${OSNAME}" == "macos" ];then
USER=$(who | sed -n "2,1p" |awk '{print $1}')
DEV="/Users/${USER}/Desktop/mwdev"
cd $DEV && bash scripts/install/${OSNAME}.sh
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
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
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh
fi