summaryrefslogtreecommitdiffstats
path: root/.github/scripts/ci-support-pkgs.sh
diff options
context:
space:
mode:
Diffstat (limited to '.github/scripts/ci-support-pkgs.sh')
-rwxr-xr-x.github/scripts/ci-support-pkgs.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/scripts/ci-support-pkgs.sh b/.github/scripts/ci-support-pkgs.sh
index bfa9c83a..9ba11b68 100755
--- a/.github/scripts/ci-support-pkgs.sh
+++ b/.github/scripts/ci-support-pkgs.sh
@@ -5,10 +5,13 @@
set -e
-if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] || [ -f /etc/almalinux-release ]; then
- # Alma, Fedora, CentOS, Redhat
- dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
-elif [ -f /etc/arch-release ]; then
- # Arch
- pacman -S --noconfirm cronie
-fi
+. /etc/os-release
+
+case "${ID}" in
+ amzn|almalinux|centos|fedora)
+ dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
+ ;;
+ arch)
+ pacman -S --noconfirm cronie
+ ;;
+esac