From: Magnus Jacobsson Date: Tue, 20 Oct 2020 13:51:12 +0000 (+0200) Subject: Add support for macOS to ci/install.sh X-Git-Tag: 2.46.0~20^2^2~15^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6edb4c525996f47891c6114c4fb7ede37992bb7;p=graphviz Add support for macOS to ci/install.sh --- diff --git a/ci/install-packages.sh b/ci/install-packages.sh index c85a5295c..839f2d29b 100755 --- a/ci/install-packages.sh +++ b/ci/install-packages.sh @@ -5,6 +5,9 @@ set -x if test -f /etc/os-release; then cat /etc/os-release . /etc/os-release +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' ) @@ -18,6 +21,9 @@ ARCH=$( uname -m ) if [ "${build_system}" = "cmake" ]; then if [ "${ID_LIKE}" = "debian" ]; then apt install ./${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Linux.deb + elif [ "${ID}" = "Darwin" ]; then + unzip ${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Darwin.zip + cp -rp Graphviz-${GV_VERSION}-Darwin/* /usr/local else rpm --install --force ${DIR}/os/${ARCH}/Graphviz-${GV_VERSION}-Linux.rpm fi @@ -26,6 +32,9 @@ else 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 + elif [ "${ID}" = "Darwin" ]; then + tar xf ${DIR}/os/${ARCH}/graphviz-${GV_VERSION}-${ARCH}.tar.gz + cp -rp build/* /usr/local else rpm --install --force \ ${DIR}/os/${ARCH}/graphviz-${GV_VERSION}*.rpm \