From: Ciaran Gultnieks Date: Tue, 19 Apr 2011 21:23:13 +0000 (+0100) Subject: Addition to update.py to make version updating easier X-Git-Tag: 0.1~1408 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a6daaa7559f9ed74216af5c94235d8afef133b61;p=fdroidserver.git 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". --- diff --git a/update.py b/update.py index 61598d01..bd7e0acf 100755 --- a/update.py +++ b/update.py @@ -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