aboutsummaryrefslogtreecommitdiff
path: root/src/args.c
blob: 445d276ce2153f25347ed91ff04750c1fee00bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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); };