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 FLAG_NONE 0
2 #define OPT_GOOD 0
3 #define OPT_FAIL 1
4 #define OPT_SKIP 2
5 #define OPT_LAST 3
6
7 #define ERROR(...) { fprintf(stderr, __VA_ARGS__); return OPT_FAIL; }
8
9 #define USAGE \
10 "Usage: %s [-i] [-p] [-o DIR] [-b URL] [-c DIR] REPO [REPO2 [...]]" "\n" \
11 " -i: generate index file" "\n" \
12 " -p: generate repository pages" "\n" \
13 " -o: specify output dir" "\n" \
14 " -b: specify base url" "\n" \
15 " -c: specify cache dir" "\n"
16
17 #define PRINT_USAGE(argv0) fprintf(stderr, USAGE, argv0);
18
19
20 typedef struct _ {
21 int index; /* 0 or 1 */
22 int pages; /* 0 or 1 */
23
24 const char *cache;
25 const char *out_dir;
26 const char *base_url;
27
28 int repo_count;
29 const char **repo_dirs;
30 } Opt;
31
32 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.