From 6ee7fc6b168bd1e4e2707ad4245f29889c0b9705 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 24 Jan 2024 13:15:50 -0600 Subject: [PATCH] Preserve executable permissions when installing scripts These scripts use a "shebang" to indicate what interpreter to use when directly invoking them from a shell, however when they are installed, the executable permissions are dropped meaning that they actually can't be invoked directly from a shell. An alternative to this change might be to drop the "shebang" from the scripts if they are intended to be invoked explicitly using the desired interpreter, i.e. `sh tools/doc_check.sh`. Signed-off-by: Scott K Logan --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da82078b..4cdf45a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,17 +36,20 @@ add_subdirectory(doc) #-------------------------------------- # Install the benchmark files install(DIRECTORY benchmark/ - DESTINATION ${GZ_DATA_INSTALL_DIR}/benchmark) + DESTINATION ${GZ_DATA_INSTALL_DIR}/benchmark + USE_SOURCE_PERMISSIONS) #-------------------------------------- # Install the codecheck files install(DIRECTORY codecheck/ - DESTINATION ${GZ_DATA_INSTALL_DIR}/codecheck) + DESTINATION ${GZ_DATA_INSTALL_DIR}/codecheck + USE_SOURCE_PERMISSIONS) #-------------------------------------- # Install the tools files install(DIRECTORY tools/ - DESTINATION ${GZ_DATA_INSTALL_DIR}/tools) + DESTINATION ${GZ_DATA_INSTALL_DIR}/tools + USE_SOURCE_PERMISSIONS) #============================================================================ # Configure the package to be installed