]> granicus.if.org Git - graphviz/commitdiff
remove /etc/redhat-release path in build script
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 18:10:15 +0000 (11:10 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 1 May 2021 19:07:28 +0000 (12:07 -0700)
Every distro Graphviz CI now runs on appears to have an /etc/os-release, so this
code is unused.

ci/build.sh

index c01119cf452afdd64e1724f7f8475732ce832263..747631bdd553bcd87baf18083405dc49bfdf13ed 100755 (executable)
@@ -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 )