From 4d8f09ee68cab0d8b9f64da373113933a2758ffe Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Wed, 3 Mar 2021 13:24:16 +0100 Subject: [PATCH] Use the right installation directories. --- CMakeLists.txt | 6 +++--- scripts/postinst.sh | 1 + scripts/ybcon | 2 +- src/etc/lexer.cpp | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index feeb3c8..0c15237 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,10 +80,10 @@ if (UNIX AND NOT MINGW) endif() install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/ybcon - DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ybcon.d) - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/completions DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ybcon.d) + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/completions DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ybcon.d) install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ybcon - DESTINATION ${CMAKE_INSTALL_BINDIR}) + DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR}) endif() elseif(MINGW OR MSVC) set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}") diff --git a/scripts/postinst.sh b/scripts/postinst.sh index 75ece12..8402a30 100644 --- a/scripts/postinst.sh +++ b/scripts/postinst.sh @@ -3,6 +3,7 @@ # Post install ybcon script ybconDir="/opt/etc/ybcon.d" +ln -sf "/opt/yerbacon/bin/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 b/scripts/ybcon index 6d00c4d..5e69360 100755 --- a/scripts/ybcon +++ b/scripts/ybcon @@ -5,7 +5,7 @@ EXENAME=ybcon # Default location of the executable -defaultBinLocation=/opt/etc/ybcon.d/ybcon +defaultBinLocation=/opt/libexec/ybcon usage() { if [ "$1" = false ]; then echo "Invalid arguments, usage:"; fi diff --git a/src/etc/lexer.cpp b/src/etc/lexer.cpp index 1918225..b5cd636 100644 --- a/src/etc/lexer.cpp +++ b/src/etc/lexer.cpp @@ -54,7 +54,8 @@ vector& lex(const string& in) case tok::STRING: { generated.first = type; longLex = true; - }; break; + break; + } default: resVal.emplace_back(type, string(1, current)); } break;