From c815f4b007502eb50b637d62c43c16e9f7e7f3be Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 1 Aug 2023 22:33:07 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E7=94=A8=E6=B3=95=E6=98=BE=E7=A4=BA=20?= =?UTF-8?q?opensuse=20=E5=92=8C=20arch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index 2d392fd..c507c7d 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -15,6 +15,8 @@ Usage: reinstall.sh centos-7/8/9 ubuntu-20.04/22.04 alpine-3.16/3.17/3.18 debian-10/11/12 + opensuse-15.4/15.5 + arch windows --iso=xxx --image-name=xxx dd --img=xxx EOF @@ -457,7 +459,18 @@ is_distro_like_redhat() { # 检查是否为正确的系统名 verify_os_string() { - for os in 'centos-7|8|9' 'alma|rocky-8|9' 'fedora-37|38' 'ubuntu-20.04|22.04' 'alpine-3.16|3.17|3.18' 'debian-10|11|12' 'arch-' 'windows-' 'dd-'; do + for os in \ + 'centos-7|8|9' \ + 'alma-8|9' \ + 'rocky-8|9' \ + 'fedora-37|38' \ + 'ubuntu-20.04|22.04' \ + 'alpine-3.16|3.17|3.18' \ + 'debian-10|11|12' \ + 'opensuse-15|15.4|15.5|tumbleweed' \ + 'arch-' \ + 'windows-' \ + 'dd-'; do ds=$(echo $os | cut -d- -f1) vers=$(echo $os | cut -d- -f2 | sed 's \. \\\. g') finalos=$(echo "$@" | tr '[:upper:]' '[:lower:]' | sed -n -E "s,^($ds)[ :-]?($vers)$,\1:\2,p")