From b868103adf267984b337b14afd4057c59a09fd88 Mon Sep 17 00:00:00 2001
From: Marko Petric <marko.petric@cern.ch>
Date: Mon, 14 Nov 2016 09:58:09 +0100
Subject: [PATCH] Add a bootstrap script for new users

---
 bootstrap.sh | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100755 bootstrap.sh

diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 000000000..07176651e
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+########################################################################################################################
+#
+# Assuming you have CVMFS and run SLC6, CERN Centos7 or macOS Sierra you can bootstrap DD4hep by executing this script
+#
+########################################################################################################################
+
+
+source ./.dd4hep-ci.d/init_x86_64.sh
+
+STRING=$(env LC_CTYPE=C tr -dc "a-zA-Z0-9-_\$\?" < /dev/urandom | head -c 4)
+
+mkdir build_${STRING}
+cd build_${STRING}
+if [ "$(uname)" == "Darwin" ]; then
+    cmake -GNinja -D DD4HEP_USE_GEANT4=ON -D DD4HEP_USE_BOOST=ON -DBoost_NO_BOOST_CMAKE=ON -D DD4HEP_USE_LCIO=ON -D BUILD_TESTING=ON -D Geant4_DIR=$G4INSTALL/lib/Geant4-10.2.2 -D DD4HEP_USE_CXX11=ON -DCMAKE_BUILD_TYPE=Release ..
+else
+    cmake -GNinja -D DD4HEP_USE_GEANT4=ON -D DD4HEP_USE_BOOST=ON -DBoost_NO_BOOST_CMAKE=ON -D DD4HEP_USE_LCIO=ON -D BUILD_TESTING=ON -D Geant4_DIR=$G4INSTALL/lib64/Geant4-10.2.2 -D DD4HEP_USE_CXX11=ON -DCMAKE_BUILD_TYPE=Release ..
+fi
+ninja
+ninja install
+../bin/thisdd4hep.sh
+ctest --output-on-failure -j4
+cd ../examples/
+mkdir build_${STRING}
+cd build
+cmake -GNinja ..
+ninja
+ninja install
+ctest --output-on-failure
\ No newline at end of file
-- 
GitLab