Skip to content

Commit

Permalink
rest-frontend: mount configuration file during installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Namoshek committed Nov 29, 2016
1 parent ba1728b commit fbe9a93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools/rest-frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ if (NOT NPM_EXECUTABLE)
remove_tool (${tool} "dependency manager 'npm' not found")
else ()

# create simplified tool name without special characters
string (REGEX REPLACE "[^a-zA-Z]" "" tool_name_simplified ${tool})

# define configuration path
set (config_root "/sw/elektra/${tool_name_simplified}/#0/")
set (config_default_profile "current")

# find installation path
set (install_directory ${TARGET_TOOL_DATA_FOLDER}/${tool})

Expand Down Expand Up @@ -38,6 +45,7 @@ else ()
if (NOT EXISTS ${install_directory}/application-config.json)
install (FILES application-config.json DESTINATION ${install_directory})
endif ()
install (CODE "execute_process (COMMAND kdb mount ${CMAKE_INSTALL_PREFIX}/${install_directory}/application-config.json \"system${config_root}${config_default_profile}\" yajl)")
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/run-${tool} ${CMAKE_CURRENT_BINARY_DIR}/stop-${tool}
${CMAKE_CURRENT_BINARY_DIR}/configure-${tool} DESTINATION ${TARGET_TOOL_EXEC_FOLDER})

Expand Down

0 comments on commit fbe9a93

Please sign in to comment.