]> granicus.if.org Git - graphviz/commitdiff
Refactor ci/install.sh to check for build system before OS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 13:42:18 +0000 (15:42 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 24 Oct 2020 05:46:24 +0000 (07:46 +0200)
ci/install-packages.sh

index 8ef13ae97100db68fa18c28292e71e1b6590d00d..c85a5295cbf57995863fb0a30f94e50fac94776d 100755 (executable)
@@ -15,17 +15,17 @@ GV_VERSION=$( cat VERSION )
 COLLECTION=$( cat COLLECTION )
 DIR=Packages/${COLLECTION}/${ID}/${VERSION_ID}
 ARCH=$( uname -m )
-if [ "${ID_LIKE}" = "debian" ]; then
-    if [ "${build_system}" = "cmake" ]; then
+if [ "${build_system}" = "cmake" ]; then
+    if [ "${ID_LIKE}" = "debian" ]; then
         apt install ./${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Linux.deb
     else
+        rpm --install --force ${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Linux.rpm
+    fi
+else
+    if [ "${ID_LIKE}" = "debian" ]; then
         apt install ./${DIR}/os/${ARCH}/libgraphviz4_${GV_VERSION}-1_amd64.deb
         apt install ./${DIR}/os/${ARCH}/libgraphviz-dev_${GV_VERSION}-1_amd64.deb
         apt install ./${DIR}/os/${ARCH}/graphviz_${GV_VERSION}-1_amd64.deb
-    fi
-else
-    if [ "${build_system}" = "cmake" ]; then
-        rpm --install --force ${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Linux.rpm
     else
         rpm --install --force \
             ${DIR}/os/${ARCH}/graphviz-${GV_VERSION}*.rpm \