Created
September 26, 2019 10:47
-
-
Save ludomikula/2dd6fc57c689f1cb7412eacc45d27ea6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include "librestic_amd64.h" | |
int main(int argc, const char **argv) | |
{ | |
if (argc < 2 || argv == NULL) | |
{ | |
fprintf(stderr, "No subcommand supplied!\n"); | |
return false; | |
} | |
GoString *args = new GoString[argc -1]; | |
for (int i=1; i < argc; i++) | |
args[i-1] = { argv[i], (ptrdiff_t)strlen(argv[i]) }; | |
GoSlice resticArgs = { args, argc -1, argc -1 }; | |
int result = run(resticArgs); | |
delete[] args; | |
return (result != 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment