diff --git a/CMakeLists.txt b/CMakeLists.txt index 9199d03..f24afb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,11 +66,12 @@ if (UNIX AND NOT MINGW) set(CPACK_GENERATOR TGZ;STGZ;RPM;DEB) endif() install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ybcon ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bash-completion.sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/fish-completion.fish ${CMAKE_CURRENT_SOURCE_DIR}/scripts/zsh-completion.zsh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ybcon.d) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ybcon.sh + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon PERMISSIONS OWNER_WRITE OWNER_EXECUTE diff --git a/scripts/postinst.sh b/scripts/postinst.sh index ee2ec82..d34635a 100644 --- a/scripts/postinst.sh +++ b/scripts/postinst.sh @@ -2,9 +2,9 @@ # Post install ybcon script -ln -sf /opt/bin/ybcon.sh /usr/bin/ybcon - ybconDir="/opt/etc/ybcon.d" +ln -sf "$ybconDir/ybcon" "/usr/bin/ybcon" + fishLoc="/usr/share/fish/vendor_completions.d" bashcompleteLoc="/etc/bash_completion.d" zshLoc="/etc/zsh_completion.d" diff --git a/scripts/ybcon.sh b/scripts/ybcon similarity index 100% rename from scripts/ybcon.sh rename to scripts/ybcon