删除换源重复代码,修复docker菜单
This commit is contained in:
parent
c64f6a5be9
commit
f58014674f
@ -15,13 +15,11 @@ echo "========Docker========"
|
||||
echo "1.换源"
|
||||
echo "2.清除所有未使用镜像"
|
||||
echo "-----一键搭建软件-----"
|
||||
cd "Config/Docker"
|
||||
for i in *;do
|
||||
for i in "${path_script}/Config/Docker"/*;do
|
||||
pick_number=$((pick_number + 1))
|
||||
pick_array[$pick_number]=$(awk -F '.' '{print $1}' <<< "$i")
|
||||
pick_array[$pick_number]=$(awk -F '.' '{print $1}' <<< "$(basename $i)")
|
||||
echo "${pick_number}.${pick_array[$pick_number]}"
|
||||
done
|
||||
cd - >> /dev/null
|
||||
echo "-----一键搭建软件-----"
|
||||
echo "任意输入返回主菜单"
|
||||
echo "========Docker========"
|
||||
|
@ -2,14 +2,6 @@
|
||||
|
||||
declare version=$(cat /etc/os-release | grep VERSION_CODENAME | awk -F '=' '{print $2}')
|
||||
|
||||
case "$version" in
|
||||
'bookworm')
|
||||
;;
|
||||
*)
|
||||
echo "暂不支持该系统一键换源"
|
||||
exit
|
||||
esac
|
||||
|
||||
declare -A sources_dick
|
||||
sources_dick['中国科技技术大学(默认)']='http://mirrors.ustc.edu.cn'
|
||||
sources_dick['清华大学']='https://mirrors.tuna.tsinghua.edu.cn'
|
||||
@ -52,7 +44,7 @@ EOF
|
||||
sudo apt-get update -y
|
||||
;;
|
||||
*)
|
||||
echo "暂不支持该系统配置自动更新软件"
|
||||
echo "暂不支持该系统一键换源"
|
||||
exit
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user