X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=natalie.py;h=267a52f582e72b688ba5092be29e76f37d052cf6;hb=4ca363ee2dbd7994822af3d789bfc4d4d2cb188c;hp=8206ddfe8715705457f1432def9614a9559fe1e7;hpb=43722e2ebdfdcc25098483f3fa05b7ee857b1466;p=dak.git diff --git a/natalie.py b/natalie.py index 8206ddfe..267a52f5 100755 --- a/natalie.py +++ b/natalie.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # Manipulate override files -# Copyright (C) 2000 James Troup -# $Id: natalie.py,v 1.1 2001-01-10 05:58:26 troup Exp $ +# Copyright (C) 2000, 2001 James Troup +# $Id: natalie.py,v 1.3 2001-03-02 02:24:33 troup Exp $ # 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 @@ -31,6 +31,25 @@ projectB = None; ################################################################################ +def usage (exit_code): + print """Usage: natalie.py [OPTIONS] + -D, --debug=VALUE debug + -h, --help this help + -V, --version retrieve version + -c, --component=CMPT list/set overrides by component + (contrib,*main,non-free) + -s, --suite=SUITE list/set overrides by suite + (experimental,stable,testing,*unstable) + -t, --type=TYPE list/set overrides by type + (*deb,dsc,udeb) + -S, --set set overrides from stdin + -l, --list list overrides on stdout + + starred (*) values are default""" + sys.exit(exit_code) + +################################################################################ + def init(): global projectB; @@ -194,6 +213,9 @@ def main (): ('t',"type","Natalie::Options::Type", "HasArg")]; file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + if Cnf["Natalie::Options::Help"]: + usage(0); + init(); action = None;