From 3fc43f9e9f85b60f215795f27f76d66e78b652a1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 4 Sep 2018 12:01:25 +0200 Subject: [PATCH] Fix for those scripts Use the `${INIT_FILE:+..}` syntax, for compatibility when `INIT_FILE` is unset or empty. --- Scripts/developer_scripts/autotest_cgal | 2 +- Scripts/developer_scripts/create_cgal_test | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Scripts/developer_scripts/autotest_cgal b/Scripts/developer_scripts/autotest_cgal index 462815bb483..848566200f7 100755 --- a/Scripts/developer_scripts/autotest_cgal +++ b/Scripts/developer_scripts/autotest_cgal @@ -525,7 +525,7 @@ export MAKE_CMD; export CGAL_BINARY_DIR; export CGAL_REFERENCE_CACHE_DIR; cd '${CGAL_BINARY_DIR}'; -cmake -C"${CGAL_REFERENCE_CACHE_DIR}/init.cmake" '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\ +cmake \${INIT_FILE:+"-C\${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\ -DCGAL_REFERENCE_CACHE_DIR="\$CGAL_REFERENCE_CACHE_DIR" \\ VERBOSE=1 \\ ../../..; diff --git a/Scripts/developer_scripts/create_cgal_test b/Scripts/developer_scripts/create_cgal_test index 9143b7fc295..8f16fec5d70 100755 --- a/Scripts/developer_scripts/create_cgal_test +++ b/Scripts/developer_scripts/create_cgal_test @@ -74,20 +74,20 @@ cat << EOF EOF header "configure" -cat << EOF +cat << 'EOF' configure() { echo "Configuring... " - if eval 'cmake -C"\$INIT_FILE" "\$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\ - -DCGAL_DIR="\$CGAL_DIR" \\ + if eval 'cmake ${INIT_FILE:+"-C${INIT_FILE}"} "$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\ + -DCGAL_DIR="$CGAL_DIR" \\ --no-warn-unused-cli \\ .' ; then - echo " successful configuration" >> \$ERRORFILE + echo " successful configuration" >> $ERRORFILE else - echo " ERROR: configuration" >> \$ERRORFILE + echo " ERROR: configuration" >> $ERRORFILE fi }