From aec36182da4f1f0e754cc53ab9f8dd08c0ff9a28 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 8 Mar 2012 15:19:55 -0500 Subject: [PATCH] dispatch-conf: add --help/--version flags Signed-off-by: Mike Frysinger --- bin/dispatch-conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 75e991189..a77811881 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -459,6 +459,19 @@ def spawn_shell(cmd): else: os.system(cmd) +def usage(argv): + print('dispatch-conf: sane configuration file update\n') + print('Usage: dispatch-conf [config dirs]\n') + print('See the dispatch-conf(1) man page for more details') + sys.exit(os.EX_OK) + +for x in sys.argv: + if x in ('-h', '--help'): + usage(sys.argv) + elif x in ('--version'): + print("Portage", portage.VERSION) + sys.exit(os.EX_OK) + # run d = dispatch () -- 2.26.2