Update install_dev.sh

pull/795/head
dami 4 weeks ago
parent 3cd9b52d2a
commit a148e27211
  1. 18
      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

Loading…
Cancel
Save