From b2a9fcd5cfd1bf84321b8bf53b37e7fb98618d6e Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 2 Apr 2010 11:55:09 -0700 Subject: notmuch: Add a version (0.1 initially) with a new --version option. We're planning to do actual releases soon, so we need a version number to put into the tar file. --- notmuch.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'notmuch.c') diff --git a/notmuch.c b/notmuch.c index 3b743a90..e519f98e 100644 --- a/notmuch.c +++ b/notmuch.c @@ -309,6 +309,7 @@ usage (FILE *out) fprintf (out, "Usage: notmuch --help\n" + " notmuch --version\n" " notmuch [args...]\n"); fprintf (out, "\n"); fprintf (out, "Where and [args...] are as follows:\n"); @@ -462,6 +463,11 @@ main (int argc, char *argv[]) if (STRNCMP_LITERAL (argv[1], "--help") == 0) return notmuch_help_command (NULL, 0, NULL); + if (STRNCMP_LITERAL (argv[1], "--version") == 0) { + printf ("notmuch version " STRINGIFY(NOTMUCH_VERSION) "\n"); + return 0; + } + for (i = 0; i < ARRAY_SIZE (commands); i++) { command = &commands[i]; -- cgit v1.2.3