From ad9595b3b2a0bffda88f37acb9e468054fbdb054 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 4 Sep 2022 17:01:47 +0800 Subject: [PATCH] Update update_dev.sh --- scripts/update_dev.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index a729faab1..062f4e1a9 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -49,7 +49,14 @@ else OSNAME='unknow' fi -wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip +cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") +if [ ! -z "$cn" ];then + wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip +else + wget -O /tmp/dev.zip https://codeload.github.com/midoks/mdserver-web/zip/dev +fi + +# wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip cd /tmp && unzip /tmp/dev.zip cp -rf /tmp/mdserver-web-dev/* /www/server/mdserver-web rm -rf /tmp/dev.zip