diff options
author | Richard Hughes <richard@hughsie.com> | 2013-01-24 10:30:27 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2013-01-24 10:30:27 +0000 |
commit | 4789d704e5abbfbd9793c1c3b289c6edfe059db9 (patch) | |
tree | 67fead0d914da9ea35e7c42d5c78fa6a2359e271 /client/cd-util.c | |
parent | 3c19a60378e8bff959c783e7a95e239be34ddcd8 (diff) | |
download | colord-4789d704e5abbfbd9793c1c3b289c6edfe059db9.tar.gz |
Add a --version argument to colormgr
Diffstat (limited to 'client/cd-util.c')
-rw-r--r-- | client/cd-util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/cd-util.c b/client/cd-util.c index c6c0cc8..ea0bc97 100644 --- a/client/cd-util.c +++ b/client/cd-util.c @@ -1976,6 +1976,7 @@ main (int argc, char *argv[]) CdUtilPrivate *priv; gboolean ret; gboolean verbose; + gboolean version; gchar *cmd_descriptions = NULL; GError *error = NULL; guint retval = 1; @@ -1983,6 +1984,9 @@ main (int argc, char *argv[]) { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, /* TRANSLATORS: command line option */ _("Show extra debugging information"), NULL }, + { "version", '\0', 0, G_OPTION_ARG_NONE, &version, + /* TRANSLATORS: command line option */ + _("Show client and daemon versions"), NULL }, { NULL} }; @@ -2181,6 +2185,15 @@ main (int argc, char *argv[]) goto out; } + /* get version */ + if (version) { + g_print ("%s\t%s\n", _("Client version:"), + PACKAGE_VERSION); + g_print ("%s\t%s\n", _("Daemon version:"), + cd_client_get_daemon_version (priv->client)); + goto out; + } + /* run the specified command */ ret = cd_util_run (priv, argv[1], (gchar**) &argv[2], &error); if (!ret) { |