]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Trying to fix package build in stage develop
authorFrank Brehm <frank@brehm-online.com>
Fri, 1 Apr 2022 13:41:52 +0000 (15:41 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 1 Apr 2022 13:41:52 +0000 (15:41 +0200)
.gitlab-ci.yml

index e54092879c6a9b29cc8d3357c0c73f9c6286b727..31fbfff6e4496016fa2252d5d81815e63fe7d53f 100644 (file)
@@ -171,13 +171,14 @@ Linter:
   before_script:
     - ls -lA --color=always /etc/yum.repos.d
     - |
-      echo "Manipulating repo files in CentOS 8 ..."
-      if [[ "${EL_MAJOR_VERSION}" -ge "7" ]] ; then
+      if [[ "${EL_MAJOR_VERSION}" -ge "8" ]] ; then
+        echo "Manipulating repo files in CentOS 8 ..."
         for repo_file in /etc/yum.repos.d/CentOS-Linux*.repo ; do
-          echo
-          echo "Changing ${repo_file} ..."
-          sed -i -e 's/^mirrorlist/# mirrorlist/' -e 's/^#[    ]*baseurl/baseurl/' "${repo_file}"
-          cat "${repo_file}"
+          if [[ -f "${repo_file}" ]] ; then
+            echo -e "\nChanging ${repo_file} ..."
+            sed -i -e 's/^mirrorlist/# mirrorlist/' -e 's/^#[  ]*baseurl[      ]*=/baseurl=/' "${repo_file}"
+            cat "${repo_file}"
+          fi
         done
       fi
     - ${YUM} clean all