Notifications
Clear all

Support AlmaLinux for Zextra Theme

1 Posts
1 Users
2 Reactions
988 Views
 dani
(@dani)
Joined: 3 years ago
Posts: 16
Topic starter  

Hi. Now that CentOS Linux ends on december, AlmaLinux will probably more and more popular as a replacement (along with RockyLinux).

Here's a patch to make the zextra theme installer working on Alma

(edit : can't add link, so here's the patch inline)

 

diff -Nur zextras-theme-installer removed link  zextras-theme-installer_mod removed link 
--- zextras-theme-installer removed link 	2021-04-15 12:29:18.000000000 +0200
+++ zextras-theme-installer_mod removed link 	2021-09-23 17:54:45.104853816 +0200
@@ -23,6 +23,11 @@
     exit 1
   fi
 
+  if [[ "${MYOSDISTRO}" == "almalinux" ]] && [[ ${MYOSVERSION} -lt 8 || ${MYOSVERSION} -gt 8 ]]; then
+    echo "This version will only work on a system running Alma Linux 8."
+    exit 1
+  fi
+
   shopt -u nocasematch
 }
 
@@ -64,6 +69,14 @@
         VERSION_CODENAME="$(grep -oP '\d(?=\.\d+)' /etc/redhat-release)"
         ;;
     esac
+  elif [[ "${ID}" == "almalinux" ]]; then
+    case "${VERSION_ID%.*}" in
+      8) local VERSION_CODENAME="8" ;;
+      *)
+        local VERSION_CODENAME
+        VERSION_CODENAME="$(grep -oP '\d(?=\.\d+)' /etc/redhat-release)"
+        ;;
+    esac
   fi
   shopt -u nocasematch
   case "$1" in
@@ -90,7 +103,7 @@
     PKGMGR="apt"
     PKGMGRARG="install"
     PKGMGRUPDATE="apt update"
-  elif [[ "${MYOSDISTRO}" == "centos" || "${MYOSDISTRO}" == "ol" || "${MYOSDISTRO}" == "rhel" ]]; then
+  elif [[ "${MYOSDISTRO}" == "centos" || "${MYOSDISTRO}" == "ol" || "${MYOSDISTRO}" == "rhel" || "${MYOSDISTRO}" == "almalinux" ]]; then
     PKGQUERY="yum"
     PKGQUERYARG="list -q installed"
     PKGMGR="yum"

(or copy/paste this, just add https before : cloud.lapiole.org/f/bef7e20d2ecb4b0399a5/?dl=1)

This topic was modified 3 years ago 3 times by dani

   
Quote