From 1bb1f20bbf74339d42cc30398bbeeec7811631d2 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 10 Nov 2023 09:23:53 +0800 Subject: [PATCH] install.sh --- install/install.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/install/install.sh b/install/install.sh index c6189a96..af4a1646 100644 --- a/install/install.sh +++ b/install/install.sh @@ -143,11 +143,20 @@ install_tools(){ if [ "$ID" = "rhel" ] || [ "$ID" = "ol" ]; then RHEL_VERSION=${VERSION_ID%%.*} - sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm + sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm >/dev/null + if [ $? -ne 0 ]; then + exit 1 + fi elif [ "$ID" = "centos" ] || [ "$ID" = "rocky" ]; then - sudo yum install -y "$repo_tools_yum" + sudo yum install -y "$repo_tools_yum" >/dev/null + if [ $? -ne 0 ]; then + exit 1 + fi elif [ "$ID" = "amzn" ]; then - sudo amazon-linux-extras install epel -y + sudo amazon-linux-extras install epel -y >/dev/null + if [ $? -ne 0 ]; then + exit 1 + fi fi dnf --version >/dev/null 2>&1