[monitoring-plugins] CI: Fallback on software-properties-common

waja git at monitoring-plugins.org
Thu May 11 21:50:12 CEST 2023


    Module: monitoring-plugins
    Branch: master
    Commit: 483ae9fca47a424bcdbb75bfd63c90afd28b9ccc
    Author: Jan Wagner <waja at cyconet.org>
 Committer: waja <waja at users.noreply.github.com>
      Date: Thu May 11 18:01:38 2023 +0000
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=483ae9f

CI: Fallback on software-properties-common

---

 .github/prepare_debian.sh | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/.github/prepare_debian.sh b/.github/prepare_debian.sh
index 5222659..aa224ef 100755
--- a/.github/prepare_debian.sh
+++ b/.github/prepare_debian.sh
@@ -5,13 +5,18 @@ set -e
 
 export DEBIAN_FRONTEND=noninteractive
 
-sed "s/main/non-free contrib/g" /etc/apt/sources.list.d/debian.sources > /etc/apt/sources.list.d/debian-nonfree.sources
-apt-get update
-apt-get -y install software-properties-common
-if [ $(lsb_release -is) = "Debian" ]; then
-  apt-add-repository non-free
-  apt-get update
+source /etc/os-release
+
+if [ ${ID} = "debian" ]; then
+	if [ -f /etc/apt/sources.list.d/debian.sources  ]; then
+		sed "s/main/non-free contrib/g" /etc/apt/sources.list.d/debian.sources > /etc/apt/sources.list.d/debian-nonfree.sources
+	else
+		apt-get update
+		apt-get -y install software-properties-common
+		apt-add-repository non-free
+	fi
 fi
+apt-get update
 apt-get -y install perl \
 	autotools-dev \
 	libdbi-dev \



More information about the Commits mailing list