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
|
lexer.h
|
||||||
parser.c
|
parser.c
|
||||||
parser.h
|
parser.h
|
||||||
|
install_manifest.txt
|
||||||
|
@ -64,9 +64,7 @@ set(CMAKE_C_FLAGS_RELEASE "-O2")
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
# Install conf files
|
# Install conf files
|
||||||
FILE(GLOB CONF_FILES "conf/*")
|
FILE(GLOB CONF_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf" "conf/*")
|
||||||
install(
|
message(STATUS "${CONF_FILES}")
|
||||||
FILES
|
configure_file(zmap_conf_install.cmake.in zmap_conf_install.cmake)
|
||||||
${CONF_FILES}
|
install(SCRIPT zmap_conf_install.cmake)
|
||||||
DESTINATION "/etc/zmap/"
|
|
||||||
)
|
|
||||||
|
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