diff options
| author | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-08-30 18:05:26 +0200 |
|---|---|---|
| committer | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-08-30 18:05:26 +0200 |
| commit | 02fd79105a7fe5ac6a04e76db27b163e4064f759 (patch) | |
| tree | b4cdc0ad498078555259bf71c0fe8b445f23217d /src/args.c | |
| parent | 5e2367bfbe6a06c493d4b8e50917fb599a9ee5af (diff) | |
work on config and args
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); }; |
