From: Martin Zobel-Helas Date: Wed, 22 Dec 2010 22:14:11 +0000 (+0100) Subject: This is some fine documentation X-Git-Tag: userdir-ldap-0.3.79~16 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=50b1233bdf1dbc75ee87bbff79e709691440d8b8 This is some fine documentation Signed-off-by: Martin Zobel-Helas --- diff --git a/ud-gpgimport b/ud-gpgimport index b8c9987..4e26a5e 100755 --- a/ud-gpgimport +++ b/ud-gpgimport @@ -4,6 +4,7 @@ # Copyright (c) 1999-2000 Jason Gunthorpe # Copyright (c) 2004 Joey Schulze # Copyright (c) 2008, 2009, 2010 Peter Palfrader +# Copyright (c) 2010 Martin Zobel-Helas # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -106,12 +107,20 @@ def load_keys_from_gpg(keyrings): # Process options AdminUser = pwd.getpwuid(os.getuid())[0]; -(options, arguments) = getopt.getopt(sys.argv[1:], "au:m:n") +(options, arguments) = getopt.getopt(sys.argv[1:], "ahu:m:") for (switch, val) in options: if (switch == '-u'): AdminUser = val elif (switch == '-m'): LoadOverride(val); + elif (switch == '-h'): + print "Usage: ud-gpgimport " + print "Available options:" + print " -h Show this help" + print " -u= Admin user (defaults to current username)" + print " -m= Override file to use" + print " -a actually do changes, not dry-run" + sys.exit(0) elif (switch == '-a'): NoAct = 0;