From a6daaa7559f9ed74216af5c94235d8afef133b61 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Tue, 19 Apr 2011 22:23:13 +0100 Subject: [PATCH] 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". --- update.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.30.2