[tracker] tracker-status: add "--version" option
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-status: add "--version" option
- Date: Wed, 18 Nov 2009 09:21:53 +0000 (UTC)
commit 7464eab76bbdd0f080d606c20581decd5da66d7c
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Nov 18 10:08:20 2009 +0100
tracker-status: add "--version" option
src/tracker-utils/tracker-status.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-utils/tracker-status.c b/src/tracker-utils/tracker-status.c
index 594a11f..60bd9a5 100644
--- a/src/tracker-utils/tracker-status.c
+++ b/src/tracker-utils/tracker-status.c
@@ -51,6 +51,7 @@ static gchar *pause_reason;
static gint resume_cookie = -1;
static gboolean follow;
static gboolean detailed;
+static gboolean print_version;
static GOptionEntry entries[] = {
{ "follow", 'f', 0, G_OPTION_ARG_NONE, &follow,
@@ -89,6 +90,10 @@ static GOptionEntry entries[] = {
N_("Resume a miner (you must use this with --miner)"),
N_("COOKIE")
},
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &print_version,
+ N_("Print version"),
+ NULL
+ },
{ NULL }
};
@@ -335,6 +340,13 @@ main (gint argc, gchar *argv[])
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, NULL);
+ if (print_version) {
+ g_print ("%s\n", PACKAGE_STRING);
+ g_option_context_free (context);
+
+ return EXIT_SUCCESS;
+ }
+
if (pause_reason && resume_cookie != -1) {
gchar *help;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]