From 80ccebe66e71c6da570ea5a27f62c21d8c8e39aa Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 24 Apr 2021 11:10:15 -0700 Subject: [PATCH] remove /etc/redhat-release path in build script Every distro Graphviz CI now runs on appears to have an /etc/os-release, so this code is unused. --- ci/build.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index c01119cf4..747631bdd 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -4,7 +4,10 @@ set -x set -e set -o pipefail -if test -f /etc/os-release; then +if [ "$( uname -s )" = "Darwin" ]; then + ID=$( uname -s ) + VERSION_ID=$( uname -r ) +else cat /etc/os-release . /etc/os-release if [ -z ${ID_LIKE:+x} ]; then @@ -12,13 +15,6 @@ if test -f /etc/os-release; then ID_LIKE=${ID} fi fi -elif [ "$( uname -s )" = "Darwin" ]; then - ID=$( uname -s ) - VERSION_ID=$( uname -r ) -else - cat /etc/redhat-release - ID=$( cat /etc/redhat-release | cut -d' ' -f1 | tr 'A-Z' 'a-z' ) - VERSION_ID=$( cat /etc/redhat-release | cut -d' ' -f3 | cut -d'.' -f1 ) fi GV_VERSION=$( cat VERSION ) COLLECTION=$( cat COLLECTION ) -- 2.40.0