[Zope-CVS] CVS: Packages/zpkgtools/bin - zpkg:1.9

Fred L. Drake, Jr. fred at zope.com
Tue Mar 16 10:42:20 EST 2004


Update of /cvs-repository/Packages/zpkgtools/bin
In directory cvs.zope.org:/tmp/cvs-serv1685

Modified Files:
	zpkg 
Log Message:
- allow additional resource maps to be specified via the command line
  (esp. useful if there is no configuration file)
- support --version from the command line


=== Packages/zpkgtools/bin/zpkg 1.8 => 1.9 ===
--- Packages/zpkgtools/bin/zpkg:1.8	Sat Mar 13 00:56:24 2004
+++ Packages/zpkgtools/bin/zpkg	Tue Mar 16 10:42:19 2004
@@ -47,6 +47,8 @@
         tempfile.tempdir = self.tmpdir
         self.loader = cvsloader.CvsLoader()
         cf = config.Configuration(options.configfile)
+        if options.location_maps:
+            cf.location_maps[:0] = options.location_maps
         cf.finalize()
         self.locations = cf.locations
 
@@ -162,10 +164,16 @@
         argv = sys.argv
     program = os.path.basename(argv[0])
     parser = optparse.OptionParser(
-        usage="usage: %prog [options] resource")
+        usage="usage: %prog [options] resource",
+        version="%prog 0.1")
     parser.add_option(
         "-C", "--configure", dest="configfile",
         help="path or URL to the configuration file")
+    parser.add_option(
+        "-m", "--resource-map", dest="location_maps",
+        action="append",
+        help=("specify an additional location map to load before"
+              " maps specified in the configuration"))
     parser.add_option(
         "-n", "--name", dest="release_name",
         help="base name of the distribution file")




More information about the Zope-CVS mailing list