sgw | Static git web (fork of stagit) |
| download: https://git.y1.nz/archives/sgw.tar.gz | |
| README | Files | Log | Refs | LICENSE |
opt.h
1 #define MAX_REPOS 200
2
3 #define FLAG_NONE 0
4 #define OPT_GOOD 0
5 #define OPT_FAIL 1
6 #define OPT_SKIP 2
7 #define OPT_REPO 3
8
9 #define ERROR(...) { fprintf(stderr, __VA_ARGS__); return OPT_FAIL; }
10
11 #define USAGE \
12 "Usage: %s [-i] [-p] [-o DIR] [-b URL] [-c CATEGORY] REPO [REPO2 [...]]" "\n" \
13 " -i: generate index file" "\n" \
14 " -p: generate repository pages" "\n" \
15 " -o: specify output dir" "\n" \
16 " -b: specify base url" "\n" \
17 " -c: add index category (multiple allowed, between repos)" "\n"
18
19 #define PRINT_USAGE(argv0) fprintf(stderr, USAGE, argv0);
20
21
22 typedef struct _ {
23 int index; /* 0 or 1 */
24 int pages; /* 0 or 1 */
25
26 const char *out_dir;
27 const char *base_url;
28
29 int repo_count;
30 const char **repo_dirs;
31 const char **categories;
32 } Opt;
33
34 int parse_opts(Opt *opt, int argc, const char *argv[]);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.