diff options
Diffstat (limited to 'src/args.c')
| -rw-r--r-- | src/args.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/args.c b/src/args.c new file mode 100644 index 0000000..424492c --- /dev/null +++ b/src/args.c @@ -0,0 +1,38 @@ +#include "args.h" + +#include "stdbool.h" +#include "stdio.h" +#include "string.h" + +char *help = "pow! - the pow!erful package manager\n" + "Made with love by forever2k38\n" + "Source code at: https://codeberg.org/einfach/pow\n" + "Use outside of einfach is unsupported.\n" + "This software comes with no warranty.\n" + "\n" + "Usage: pow\n" + " --help Prints this help message\n" + " -c Specify config file path.\n"; + +int pow_args_parse(int argc, char **argv, pow_args *args) { + int flags = 0; + + for (int i = 0; i < argc; i++) { + char *arg = argv[i]; + + if (strcmp(arg, "--help") == 0) { + flags |= POW_FLAG_HELP; + + continue; + } + + if (strcmp(arg, "-c") == 0) { + } + } + + args->flags = flags; + + return 0; +} + +void pow_args_print_help() { printf("%s", help); }; |
