docker安装恢复版本获取,docker换源展示源数组错误,备份python直接安装不检测

This commit is contained in:
lsy 2024-09-12 13:20:44 +08:00
parent c84211da77
commit 59df170455
3 changed files with 10 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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