Add dependency + adjust styling.

This commit is contained in:
Louis-Bertrand Varin 2017-02-02 10:51:33 -05:00
parent 9cfc862b07
commit bf9b23539e
2 changed files with 7 additions and 8 deletions

View File

@ -28,4 +28,5 @@ target_link_libraries(keepassxc-cli
keepassx_core keepassx_core
Qt5::Core Qt5::Core
${GCRYPT_LIBRARIES} ${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES}) ${ZLIB_LIBRARIES})

View File

@ -60,16 +60,14 @@ int main(int argc, char **argv)
argv[i] = argv[i + 1]; argv[i] = argv[i + 1];
} }
argv[argc - 1] = nullptr; argv[argc - 1] = nullptr;
argc--; --argc;
if (commandName == "merge") if (commandName == "merge") {
{
argv[0] = const_cast<char*>("keepassxc-cli merge"); argv[0] = const_cast<char*>("keepassxc-cli merge");
return Merge::execute(argc, argv); return Merge::execute(argc, argv);
} }
if (commandName == "extract") if (commandName == "extract") {
{
argv[0] = const_cast<char*>("keepassxc-cli extract"); argv[0] = const_cast<char*>("keepassxc-cli extract");
return Extract::execute(argc, argv); return Extract::execute(argc, argv);
} }