From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-commits+bounces-437199-garchives=archives.gentoo.org@lists.gentoo.org>) id 1S5mj8-0003IW-Bd for garchives@archives.gentoo.org; Thu, 08 Mar 2012 23:26:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5064E08B0; Thu, 8 Mar 2012 23:26:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BA7BFE08B0 for <gentoo-commits@lists.gentoo.org>; Thu, 8 Mar 2012 23:26:20 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 28E131B4027 for <gentoo-commits@lists.gentoo.org>; Thu, 8 Mar 2012 23:26:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5EEA8E542C for <gentoo-commits@lists.gentoo.org>; Thu, 8 Mar 2012 23:26:18 +0000 (UTC) From: "Mike Frysinger" <vapier@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" <vapier@gentoo.org> Message-ID: <1331237995.aec36182da4f1f0e754cc53ab9f8dd08c0ff9a28.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/dispatch-conf X-VCS-Directories: bin/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: aec36182da4f1f0e754cc53ab9f8dd08c0ff9a28 X-VCS-Branch: master Date: Thu, 8 Mar 2012 23:26:18 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: cdb6ab10-4c5e-4120-8d33-bf78401e60ef X-Archives-Hash: ec2dec8a9fd0d51b632ed702d3ff53be commit: aec36182da4f1f0e754cc53ab9f8dd08c0ff9a28 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Thu Mar 8 20:19:55 2012 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Thu Mar 8 20:19:55 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Daec36182 dispatch-conf: add --help/--version flags Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> --- bin/dispatch-conf | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 75e9911..a778118 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -459,6 +459,19 @@ def spawn_shell(cmd): else: os.system(cmd) =20 +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 =3D dispatch () =20