Update buildvm.sh

This commit is contained in:
spiritLHLS 2023-04-17 20:46:10 +08:00 committed by GitHub
parent 4922cb5e38
commit 77e885c2a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ rm -rf "vm$name"
if [ ! -d "qcow" ]; then if [ ! -d "qcow" ]; then
mkdir qcow mkdir qcow
fi fi
systems=("centos7" "debian10" "debian11" "debian9" "ubuntu18" "ubuntu20" "ubuntu22" "centos9-stream" "centos8-stream") systems=("centos7" "debian10" "debian11" "debian9" "ubuntu18" "ubuntu20" "ubuntu22" "centos9-stream" "centos8-stream" "archlinux" "almalinux8" "almalinux9")
for sys in ${systems[@]}; do for sys in ${systems[@]}; do
if [[ "$system" == "$sys" ]]; then if [[ "$system" == "$sys" ]]; then
file_path="/root/qcow/${system}.qcow2" file_path="/root/qcow/${system}.qcow2"
@ -35,7 +35,7 @@ for sys in ${systems[@]}; do
fi fi
done done
if [[ -z "$file_path" ]]; then if [[ -z "$file_path" ]]; then
echo "无法安装对应系统,仅支持 debian9 debian10 debian11 ubuntu18 ubuntu20 ubuntu22 centos9-stream centos8-stream centos7" echo "无法安装对应系统,仅支持 debian9 debian10 debian11 ubuntu18 ubuntu20 ubuntu22 centos9-stream centos8-stream centos7 archlinux almalinux8 almalinux9"
exit 1 exit 1
fi fi
url="https://github.com/spiritLHLS/Images/releases/download/v1.0/${system}.qcow2" url="https://github.com/spiritLHLS/Images/releases/download/v1.0/${system}.qcow2"