更换vpn菜单和源检测方法
This commit is contained in:
parent
5befa76b71
commit
7f412adde7
@ -23,7 +23,7 @@ read -p "请输入:" pick
|
|||||||
|
|
||||||
if [[ -z $pick ]];then
|
if [[ -z $pick ]];then
|
||||||
declare url='http://mirrors.ustc.edu.cn'
|
declare url='http://mirrors.ustc.edu.cn'
|
||||||
elif [[ ${pick} -le 0 || ${pick} -gt ${#sources_dick[*]} ]];then
|
elif [[ ${pick} =~ [1-${#sources_dick[@]}] ]];then
|
||||||
echo "输入错误"
|
echo "输入错误"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
|
@ -16,7 +16,7 @@ for i in "${!vpn_array[@]}";do
|
|||||||
done
|
done
|
||||||
read -p "请输入要选择的序号:" vpn_pick
|
read -p "请输入要选择的序号:" vpn_pick
|
||||||
|
|
||||||
if [[ $vpn_pick =~ [1-$vpn_number] ]];then
|
if [[ $vpn_pick =~ [1-${#vpn_array[@]}] ]];then
|
||||||
eval "${vpn_array[${vpn_index[$vpn_pick]}]}"
|
eval "${vpn_array[${vpn_index[$vpn_pick]}]}"
|
||||||
echo "安装完成"
|
echo "安装完成"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user