Permalink
Browse files

Make --package parameter optional

  • Loading branch information...
1 parent 6cd8ef6 commit d06886feb08b61e27d0b9a020bf46f1864595d79 @saschpe saschpe committed Dec 11, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 git_tarballs
View
@@ -17,6 +17,7 @@
import argparse
from datetime import datetime
import glob
+import os
import re
import sys
import tarfile
@@ -177,15 +178,17 @@ if __name__ == '__main__':
help='upstream tarball URL to download')
parser.add_argument('--filename',
help='where to save the downloaded tarball')
- parser.add_argument('--package', required=True,
- help='the rpm package name')
+ parser.add_argument('--package',
+ help='the OBS package name')
parser.add_argument('--email', required=True,
help='email of the commit author (for the .changes file)')
parser.add_argument('--outdir', help='osc service parameter that does nothing')
args = parser.parse_args()
if not args.filename:
args.filename = args.url.rsplit("/", 1)[1]
+ if not args.package:
+ args.package = os.getcwd().rsplit("/", 1)[1]
download_tarball(args.url, args.filename)
changelog = get_changelog_from_tarball(args.filename)

0 comments on commit d06886f

Please sign in to comment.