From ed7e624792055dcdc012a4f4b7dc94bb4d622920 Mon Sep 17 00:00:00 2001
From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de>
Date: Wed, 22 Apr 2020 09:42:16 +0200
Subject: [PATCH] [install] add check for existing cmake.opts file

---
 bin/installdumux.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/installdumux.sh b/bin/installdumux.sh
index c3f0b80545..5956e07d3f 100755
--- a/bin/installdumux.sh
+++ b/bin/installdumux.sh
@@ -82,7 +82,12 @@ echo "(2/3) Configure and build dune modules and dumux using dunecontrol. This m
 echo "**************************************************************************************************"
 
 # run dunecontrol
-wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/raw/releases/3.2/cmake.opts
+if [ ! -f "cmake.opts" ]; then
+    wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/raw/releases/3.2/cmake.opts
+else
+    echo "A cmake.opts file already exists. The existing file will be used to configure dumux."
+fi
+
 ./dune-common/bin/dunecontrol --opts=cmake.opts all
 
 if [ $? -ne 0 ]; then
-- 
GitLab