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
Qt5::Core
${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES})

View File

@ -57,20 +57,18 @@ int main(int argc, char **argv)
QString commandName = args.at(0);
for (int i = 1; i < argc - 1; ++i) {
argv[i] = argv[i+1];
argv[i] = argv[i + 1];
}
argv[argc - 1] = nullptr;
argc--;
--argc;
if (commandName == "merge")
{
argv[0] = const_cast<char *>("keepassxc-cli merge");
if (commandName == "merge") {
argv[0] = const_cast<char*>("keepassxc-cli merge");
return Merge::execute(argc, argv);
}
if (commandName == "extract")
{
argv[0] = const_cast<char *>("keepassxc-cli extract");
if (commandName == "extract") {
argv[0] = const_cast<char*>("keepassxc-cli extract");
return Extract::execute(argc, argv);
}