diff --git a/Config/Automation/backup.sh b/Config/Automation/backup.sh index f5a23d8..cd80e44 100644 --- a/Config/Automation/backup.sh +++ b/Config/Automation/backup.sh @@ -39,16 +39,14 @@ if [[ $local_pick =~ Yy ]];then fi if [[ ! $baidu_pick =~ [Nn] ]];then - if ! command -v python3 -m venv &> /dev/null ; then - if [[ -f "/usr/bin/apt-get" ]];then - sudo apt-get install python3-venv -y - elif [[ -f "/usr/bin/apt" ]];then - sudo apt-get install python3-venv -y - else - echo "无法自动安装 python3-venv 请手动安装" - exit - fi - fi + if [[ -f "/usr/bin/apt-get" ]];then + sudo apt-get install python3-venv -y + elif [[ -f "/usr/bin/apt" ]];then + sudo apt-get install python3-venv -y + else + echo "无法自动安装 python3-venv 请手动安装" + exit + fi python3 -m venv "${path}/venv" source "${path}/venv/bin/activate" pip install bypy diff --git a/Menus/Docker.sh b/Menus/Docker.sh index 1d684b2..c7baafc 100644 --- a/Menus/Docker.sh +++ b/Menus/Docker.sh @@ -36,7 +36,7 @@ if [[ $pick == '1' ]];then for i in "${!img_dick[@]}"; do img_pick=$(( img_pick+1 )) - declare[$img_pick]=$i + img_number[$img_pick]=$i echo "${img_pick}.${i}" done read -p "请输入要选择的镜像,也可直接输入镜像网站:" img_pick diff --git a/Menus/Software.sh b/Menus/Software.sh index a7ed966..24f527c 100644 --- a/Menus/Software.sh +++ b/Menus/Software.sh @@ -1,6 +1,7 @@ #!/bin/bash declare install_str +declare version="$(cat /etc/os-release | grep "^ID" | awk -F '=' '{print $2}')" declare pkg if [[ -f "/usr/bin/apt-get" ]];then