| Date: Fri, 23 Jun 2017 12:35:49 +0200
usage: add -b, sort flag in parsing code
Diffstat:
M stagit-gopher.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- |
| @@ -1060,7 +1060,7 @@ err:
void
usage(char *argv0)
{
- fprintf(stderr, "%s [-c cachefile] repodir\n", argv0);
+ fprintf(stderr, "%s [-b baseprefix] [-c cachefile] repodir\n", argv0);
exit(1);
}
@@ -1084,14 +1084,14 @@ main(int argc, char *argv[])
if (repodir)
usage(argv[0]);
repodir = argv[i];
- } else if (argv[i][1] == 'c') {
- if (i + 1 >= argc)
- usage(argv[0]);
- cachefile = argv[++i];
} else if (argv[i][1] == 'b') {
if (i + 1 >= argc)
usage(argv[0]);
relpath = argv[++i];
+ } else if (argv[i][1] == 'c') {
+ if (i + 1 >= argc)
+ usage(argv[0]);
+ cachefile = argv[++i];
}
}
if (!repodir) |