]> granicus.if.org Git - graphviz/commitdiff
remove /etc/redhat-release path in install script
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 1 Sep 2021 01:56:50 +0000 (18:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Sep 2021 17:21:03 +0000 (10:21 -0700)
This is the equivalent of 80ccebe66e71c6da570ea5a27f62c21d8c8e39aa but applied
to the install script. Every Linux distro Graphviz CI now runs on appears to
have an /etc/os-release, so this code is unused.

ci/install-packages.sh

index 3b8457a386de9296401af312219ffb5636fc1b4d..9a3839a6d7141bc65375cda2f00744e32f6337af 100755 (executable)
@@ -2,16 +2,12 @@
 
 set -x
 
-if test -f /etc/os-release; then
-    cat /etc/os-release
-    . /etc/os-release
-elif [ "$( uname -s )" = "Darwin" ]; then
+if [ "$( 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 )
+    cat /etc/os-release
+    . /etc/os-release
 fi
 printf '%s\n' "${ID}" >OS_ID
 GV_VERSION=$( cat GRAPHVIZ_VERSION )