From def4046bcec894c9c644d43ae87178bdd4ffb215 Mon Sep 17 00:00:00 2001 From: ZhouWeitao Date: Thu, 23 Mar 2023 10:14:09 +0800 Subject: [PATCH] use different func for 7to7 and 8to8 Signed-off-by: ZhouWeitao --- dist/install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dist/install.sh b/dist/install.sh index 89338f0..b6b8065 100755 --- a/dist/install.sh +++ b/dist/install.sh @@ -68,8 +68,15 @@ migration_repo_config() { sed -i "s|https://mirrors.openanolis.cn|$mirror_site|" /etc/yum.repos.d/anolis-migration.repo } -install_same_version_migtool() { - yum -y install centos2anolis || { +install_7to7() { + yum -y install centos2anolis-*.an7.noarch || { + echo "failed to install centos2anolis" + exit 1 + } +} + +install_8to8() { + yum -y install centos2anolis-*.an8.noarch || { echo "failed to install centos2anolis" exit 1 } @@ -94,8 +101,8 @@ main() { epel_repo_config migration_repo_config case $1 in - 7to7) install_same_version_migtool;; - 8to8) install_same_version_migtool;; + 7to7) install_7to7;; + 8to8) install_8to8;; 7to8) install_7to8;; esac } -- Gitee