docker安装恢复版本获取,docker换源展示源数组错误,备份python直接安装不检测
This commit is contained in:
parent
c84211da77
commit
59df170455
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user