diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 7f5875ae9..18f87906b 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -49,14 +49,15 @@ if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://mirror.ghproxy.com/" fi -declare -A PROXY_URL -PROXY_URL["gh-proxy\.com"]="https://gh-proxy.com" +if [ "$LOCAL_ADDR" != "common" ];then + declare -A PROXY_URL + PROXY_URL['gh-proxy.com']="https://gh-proxy.com" + SOURCE_LIST_KEY_SORT_TMP=$(echo ${!PROXY_URL[@]} | tr ' ' '\n' | sort -n) + SOURCE_LIST_KEY=(${SOURCE_LIST_KEY_SORT_TMP//'\n'/}) + SOURCE_LIST_LEN=${#PROXY_URL[*]} +fi -SOURCE_LIST_KEY_SORT_TMP=$(echo ${!PROXY_URL[@]} | tr ' ' '\n' | sort -n) -SOURCE_LIST_KEY=(${SOURCE_LIST_KEY_SORT_TMP//'\n'/}) -SOURCE_LIST_LEN=${#PROXY_URL[*]} - function AutoSizeStr(){ NAME_STR=$1 NAME_NUM=$2