From 65d8d90cfba1798afbc357f6f4ff8020f7d3dddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maximilian=20H=C3=B6rl?=
 <maximilian.hoerl@mathematik.uni-stuttgart.de>
Date: Mon, 20 Apr 2020 16:10:58 +0200
Subject: [PATCH] check if CGAL is installed in install.sh

---
 install.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/install.sh b/install.sh
index cf68782..6bb657d 100644
--- a/install.sh
+++ b/install.sh
@@ -5,12 +5,12 @@ echo "**************************************************************************
 echo "(0/3) Checking all prerequistes. (git cmake gcc g++ pkg-config paraview)"
 echo "*********************************************************************************************"
 
-# check some prerequistes
-for PRGRM in git cmake gcc g++ pkg-config paraview; do
-    if ! [ -x "$(command -v $PRGRM)" ]; then
-        echo "Error: $PRGRM is not installed." >&2
-        exit 1
-    fi
+# check some prerequisites
+for pkg in git cmake gcc g++ pkg-config paraview libcgal-dev; do
+  if [ $(dpkg-query -W -f='${Status}' $pkg 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
+    echo "Error: $pkg is not installed." >&2
+    exit 1
+  fi
 done
 
 # check gcc version for C++17 support
-- 
GitLab