Commit c235090a authored by Jonathan Hanks's avatar Jonathan Hanks

Setup symlinks for bash completion at install time

if /usr/share/bash-completion/... is used, a symlink is needed per command being completed.
parent 5b1d841f
# https://stackoverflow.com/questions/35765106/symbolic-links-cmake
macro(install_symlink filepath sympath)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${filepath} ${sympath})")
install(CODE "message(\"-- Created symlink: ${sympath} -> ${filepath}\")")
endmacro(install_symlink)
configure_file(ligo_channel_completion.in ${CMAKE_CURRENT_BINARY_DIR}/ligo_channel_completion @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ligo_channel_completion"
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions)
\ No newline at end of file
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions)
install_symlink(${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ligo_channel_completion
${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ndscope)
install_symlink(${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ligo_channel_completion
${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/cdsutils)
install_symlink(${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ligo_channel_completion
${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/caget)
install_symlink(${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ligo_channel_completion
${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/caput)
install_symlink(${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/ligo_channel_completion
${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions/camonitor)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment