From f58014674f18e8a9de182d06fadec190450bf805 Mon Sep 17 00:00:00 2001 From: lsy Date: Sat, 21 Sep 2024 18:07:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8D=A2=E6=BA=90=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E4=BB=A3=E7=A0=81,=E4=BF=AE=E5=A4=8Ddocker=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Menus/Docker.sh | 6 ++---- Menus/Sources.sh | 10 +--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Menus/Docker.sh b/Menus/Docker.sh index cf29390..1c7f551 100644 --- a/Menus/Docker.sh +++ b/Menus/Docker.sh @@ -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========" diff --git a/Menus/Sources.sh b/Menus/Sources.sh index 3fb9da0..cc650bf 100644 --- a/Menus/Sources.sh +++ b/Menus/Sources.sh @@ -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