From a148e27211357e5680a6fc70845f564bde81f8cd Mon Sep 17 00:00:00 2001 From: dami Date: Mon, 18 Aug 2025 16:33:57 +0800 Subject: [PATCH] Update install_dev.sh --- scripts/install_dev.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 6e5fa789b..f68c58eb8 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -40,15 +40,15 @@ if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then LOCAL_ADDR=cn fi -# if [ "$LOCAL_ADDR" != "common" ];then -declare -A PROXY_URL -PROXY_URL["gh-proxy"]="https://gh-proxy.com/" +if [ "$LOCAL_ADDR" != "common" ];then + declare -A PROXY_URL + PROXY_URL["gh-proxy"]="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[*]} +fi function AutoSizeStr(){ @@ -130,7 +130,9 @@ function ChooseProxyURL(){ HTTP_PREFIX=${PROXY_URL[$INPUT_KEY]} } -ChooseProxyURL +if [ "$LOCAL_ADDR" != "common" ];then + ChooseProxyURL +fi if [ -f /etc/motd ];then echo "welcome to mdserver-web panel" > /etc/motd