diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-05-24 13:49:37 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-05-24 13:49:37 -0400 |
commit | 277717c817b7349eb858965444597a541325f0ec (patch) | |
tree | 972152d76e9ee516e9a6987526ae26c8a2775173 | |
parent | 9d320b572608942d4d35ffc3a2874e89839f09f8 (diff) | |
download | ipsutils-277717c817b7349eb858965444597a541325f0ec.tar.gz |
Fix argument parsing
-rwxr-xr-x | ipsbuild.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipsbuild.py b/ipsbuild.py index 3b649a7..7680f8b 100755 --- a/ipsbuild.py +++ b/ipsbuild.py @@ -20,9 +20,9 @@ import os # Initialize argument parser parser = argparse.ArgumentParser(description='Build Solaris 11 packages from .ips spec files') -parser.add_argument('--version', nargs='?', metavar='-V', help='Show version information') -parser.add_argument('--verbose', nargs='?', metavar='-v', help='Increased verbosity') -parser.add_argument('spec', nargs='+', help='An ipsutils spec file') +parser.add_argument('--version', action="store_true", help='Show version information') +parser.add_argument('--verbose', action="store_true", help='Increased verbosity') +parser.add_argument('spec', nargs='*', help='An ipsutils spec file') args = parser.parse_args() # Record current path, because we change directories from within the class @@ -30,7 +30,7 @@ args = parser.parse_args() cwd = os.path.abspath(os.curdir) if args.spec: for spec in args.spec: - build = ipsutils.build.Build(spec) + build = ipsutils.build.Build(spec, options=args) build.show_summary() build.controller.do_tasks() os.chdir(cwd) |