X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ziyi;h=cd7033429cfef972396c5aa87529c58038d5a492;hb=5fc7cefdb9b600c729ca5a82fd5b3a828f4fd370;hp=97131540b5532f5887586cdc9e8b37e2281db408;hpb=1c6bcb3e467be8d9aa2641ff60d891dc900c35f7;p=dak.git diff --git a/ziyi b/ziyi index 97131540..cd703342 100755 --- a/ziyi +++ b/ziyi @@ -3,7 +3,7 @@ # Create all the Release files # Copyright (C) 2001 Anthony Towns -# $Id: ziyi,v 1.7 2001-08-21 15:40:10 troup Exp $ +# $Id: ziyi,v 1.8 2001-09-27 01:22:51 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 @@ -34,6 +34,16 @@ projectB = None ################################################################################ +def usage (exit_code=0): + print """Usage: ziyi [OPTION] +Generate Release files. + + -h, --help show this help and exit""" + + sys.exit(exit_code) + +################################################################################ + def compressnames (tree,type,file): compress = AptCnf.get("%s::%s::Compress" % (tree,type), AptCnf.get("Default::%s::Compress" % (type), ". gzip")) result = [] @@ -89,11 +99,15 @@ def main (): AptCnf = apt_pkg.newConfiguration() apt_pkg.ReadConfigFileISC(AptCnf,utils.which_apt_conf_file()) - Arguments = [('d',"debug","Ziyi::Options::Debug", "IntVal"), - ('h',"help","Ziyi::Options::Help"), - ('v',"version","Ziyi::Options::Version")] + Arguments = [('h',"help","Ziyi::Options::Help")]; + for i in [ "help" ]: + Cnf["Ziyi::Options::%s" % (i)] = ""; suites = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv) + Options = Cnf.SubTree("Ziyi::Options") + + if Options["Help"]: + usage(); if suites == []: suites = Cnf.SubTree("Suite").List()