fail on execution of util scripts from source directory

Utils scripts must be run from the build directory to make sure
we get the right paths. Rename the settings file in source and
replace the original one with an error, so that scripts
fail with an understandable error message when run from the
source directory.
This commit is contained in:
Sarah Hoffmann
2016-07-31 22:55:38 +02:00
parent ab30a69ad9
commit 496d6bf168
3 changed files with 109 additions and 104 deletions

View File

@@ -66,7 +66,6 @@ include_directories(${LIBXML2_INCLUDE_DIR})
#-----------------------------------------------------------------------------
set(CUSTOMFILES
settings/settings.php
settings/phrase_settings.php
website/deletable.php
website/details.php
@@ -92,6 +91,8 @@ foreach (cfile ${CUSTOMFILES})
configure_file(${PROJECT_SOURCE_DIR}/${cfile} ${PROJECT_BINARY_DIR}/${cfile})
endforeach()
configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php ${PROJECT_BINARY_DIR}/settings/settings.php)
set(WEBPATHS css images js)
foreach (wp ${WEBPATHS})