Don't overwrite conf files on install
This commit is contained in:
parent
bc28a5a576
commit
f6609beb2c
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ lexer.c
|
||||
lexer.h
|
||||
parser.c
|
||||
parser.h
|
||||
install_manifest.txt
|
||||
|
@ -64,9 +64,7 @@ set(CMAKE_C_FLAGS_RELEASE "-O2")
|
||||
add_subdirectory(src)
|
||||
|
||||
# Install conf files
|
||||
FILE(GLOB CONF_FILES "conf/*")
|
||||
install(
|
||||
FILES
|
||||
${CONF_FILES}
|
||||
DESTINATION "/etc/zmap/"
|
||||
)
|
||||
FILE(GLOB CONF_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf" "conf/*")
|
||||
message(STATUS "${CONF_FILES}")
|
||||
configure_file(zmap_conf_install.cmake.in zmap_conf_install.cmake)
|
||||
install(SCRIPT zmap_conf_install.cmake)
|
||||
|
6
zmap_conf_install.cmake.in
Normal file
6
zmap_conf_install.cmake.in
Normal file
@ -0,0 +1,6 @@
|
||||
foreach(conf_file ${CONF_FILES})
|
||||
message(STATUS "${conf_file}")
|
||||
if(NOT EXISTS "/etc/zmap/${conf_file}")
|
||||
file(INSTALL "conf/${conf_file}" DESTINATION "/etc/zmap")
|
||||
endif()
|
||||
endforeach()
|
Loading…
Reference in New Issue
Block a user