1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-06 11:00:13 +02:00

Addition to update.py to make version updating easier

Adds a --update switch which runs the given command for each metadata
file where there appears to be a newer version than we have. For
example, I do "update.py -u vim".
This commit is contained in:
Ciaran Gultnieks 2011-04-19 22:23:13 +01:00
parent 3eb6377f38
commit a6daaa7559

View File

@ -47,6 +47,9 @@ parser.add_option("-q", "--quiet", action = "store_true", default=False,
help="No output, except for warnings and errors")
parser.add_option("-b", "--buildreport", action="store_true", default=False,
help="Report on build data status")
parser.add_option("-u", "--update", default=None,
help="Run the specified command for each metadata file "+
"that needs updating")
(options, args) = parser.parse_args()
@ -400,6 +403,9 @@ for app in apps:
for apk in apks:
if apk['id'] == app['id']:
print " " + str(apk['versioncode']) + " - " + apk['version']
if options.update != None:
subprocess.call([options.update, os.path.join('metadata',
app['id'] + '.txt')])
else:
apps_disabled += 1