From 73b42dd08b11be79bbeb4a09910bbe37699ff3b9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 21 Apr 2025 00:44:41 +0200 Subject: CI: Install gawk on fedora > 41 --- .github/os_detect.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.github/os_detect.sh') diff --git a/.github/os_detect.sh b/.github/os_detect.sh index ee9c145d..47c762d3 100644 --- a/.github/os_detect.sh +++ b/.github/os_detect.sh @@ -1,10 +1,17 @@ #!/bin/sh -e + +. /etc/os-release + # workaround for really bare-bones Archlinux containers: if [ -x "$(command -v pacman)" ]; then pacman --noconfirm -Sy pacman --noconfirm -S grep gawk sed fi +if [ ${ID} == "fedora" -a ${VERSION_ID} -gt 41 ]; then + dnf install -y gawk +fi + os_release_file= if [ -s "/etc/os-release" ]; then os_release_file="/etc/os-release" -- cgit v1.2.3-74-g34f1 From 278954117cabd8e76941d4191a2692bfdeb39372 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 1 Aug 2025 21:33:39 +0200 Subject: (Re)construct PLATFORM_ID as it's droped since Fedora 43 See https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID?#Drop_PLATFORM_ID --- .github/os_detect.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/os_detect.sh') diff --git a/.github/os_detect.sh b/.github/os_detect.sh index 47c762d3..3c5956de 100644 --- a/.github/os_detect.sh +++ b/.github/os_detect.sh @@ -22,4 +22,7 @@ else return 1 fi export distro_id=$(grep '^ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') +export version_id=$(grep '^VERSION_ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') export platform_id=$(grep '^PLATFORM_ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g'| cut -d":" -f2) +# Fedora dropped PLATFORM_ID: https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID?#Drop_PLATFORM_ID +if [ -z $platform_id ]; then export platform_id=$(echo ${distro_id:0:1}${version_id}); fi -- cgit v1.2.3-74-g34f1