aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gpg-error.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gpg-error.c b/src/gpg-error.c
index e5b7fc4..cc26292 100644
--- a/src/gpg-error.c
+++ b/src/gpg-error.c
@@ -451,11 +451,19 @@ main (int argc, char *argv[])
i18n_init ();
+
if (argc == 1)
{
- fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"), argv[0]);
+ fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"),
+ strrchr (argv[0],'/')? (strrchr (argv[0], '/')+1): argv[0]);
exit (1);
}
+ else if (argc == 2 && !strcmp (argv[1], "--version"))
+ {
+ fputs ("gpg-error (" PACKAGE_NAME ") " PACKAGE_VERSION "\n", stdout);
+ exit (0);
+ }
+
while (i < argc)
{