Update install.sh

pull/420/head
midoks 2 years ago
parent c0e70abe6d
commit 3c6adfbd44
  1. 15
      scripts/install.sh

@ -56,16 +56,23 @@ else
fi fi
# cn=$(curl --insecure -fsSL -m 10 https://ipinfo.io/json | grep "\"country\": \"CN\"") # HTTP_PREFIX="https://"
# LOCAL_ADDR=common
# ping -c 1 github.com > /dev/null 2>&1
# if [ "$?" != "0" ];then
# LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/"
# fi
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://" HTTP_PREFIX="https://"
LOCAL_ADDR=common LOCAL_ADDR=common
ping -c 1 github.com > /dev/null 2>&1 if [ ! -z "$cn" ];then
if [ "$?" != "0" ];then
LOCAL_ADDR=cn LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/" HTTP_PREFIX="https://ghproxy.com/"
fi fi
if [ $OSNAME != "macos" ];then if [ $OSNAME != "macos" ];then
if id www &> /dev/null ;then if id www &> /dev/null ;then
echo "" echo ""

Loading…
Cancel
Save