aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-buildpackage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-10-19 09:22:17 +0200
committerGuido Guenther <agx@sigxcpu.org>2007-10-19 09:22:17 +0200
commit53d0b13794018f88dcd2df017667e173bb333abf (patch)
treeeae05ca7a450536da845d8403c67630233684cea /git-buildpackage
parent44a34275141b0646cadfdac38f4c34bbaed1b68e (diff)
add version number to docs and a tools
Diffstat (limited to 'git-buildpackage')
-rwxr-xr-xgit-buildpackage12
1 files changed, 7 insertions, 5 deletions
diff --git a/git-buildpackage b/git-buildpackage
index 2cd26343..ac18bb11 100755
--- a/git-buildpackage
+++ b/git-buildpackage
@@ -93,14 +93,16 @@ def main(argv):
changelog = 'debian/changelog'
default_tree = 'HEAD'
retval = 0
+ prefix = "git-"
- args = [ arg for arg in argv[1:] if arg.find('--git-') == 0 ]
- dpkg_args = [ arg for arg in argv[1:] if arg.find('--git-') == -1 ]
+ args = [ arg for arg in argv[1:] if arg.find('--%s' % prefix) == 0 ]
+ dpkg_args = [ arg for arg in argv[1:] if arg.find('--%s' % prefix) == -1 ]
- if "--help" in dpkg_args:
- args.append('--help')
+ for arg in [ "--help", "-h", "--version" ]:
+ if arg in dpkg_args:
+ args.append(arg)
- parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='git-')
+ parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix=prefix)
parser.add_option("--git-ignore-new", action="store_true", dest="ignore_new", default=False,
help="build with uncommited changes in the source tree")