소스 검색

Add EPEL manually if system package unavailable

bryan 2 주 전
부모
커밋
ab45d26c12
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      installJRMC

+ 5 - 1
installJRMC

@@ -552,7 +552,11 @@ install_external_repos() {
     centos)
       if ! command -v dpkg &>/dev/null; then
         echo "Adding EPEL repository"
-        install_package epel-release
+        if ! install_package epel-release; then
+          # If epel-release is not available, install it manually
+          install_package --no-install-check \
+            "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION_ID%%.*}.noarch.rpm"
+        fi
       fi
       if ! "${PKG_QUERY[@]}" rpmfusion-free-release &>/dev/null; then
         echo "Installing the RPMFusion repository"