1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

rewritemeta: add -p option to specify package

useful if you're only working on a few packages and 'rewritemetadata' would make your working tree dirty
This commit is contained in:
Tias Guns 2012-03-11 21:35:17 +00:00 committed by Tias Guns
parent ab0ed81702
commit 08ec659441

View File

@ -36,11 +36,20 @@ def main():
parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False,
help="Spew out even more information than normal")
parser.add_option("-p", "--package", default=None,
help="Build only the specified package")
(options, args) = parser.parse_args()
# Get all apps...
apps = common.read_metadata(options.verbose)
# Filter apps according to command-line options
if options.package:
apps = [app for app in apps if app['id'] == options.package]
if len(apps) == 0:
print "No such package"
sys.exit(1)
for app in apps:
print "Writing " + app['id']
common.write_metadata(os.path.join('metadata', app['id']) + '.txt', app)