All callable scripts now implement main()

This commit is contained in:
Ciaran Gultnieks 2012-02-26 14:18:58 +00:00
parent 4e5b4fa77c
commit 00abc9527d
7 changed files with 970 additions and 936 deletions

View file

@ -27,9 +27,6 @@ from optparse import OptionParser
import HTMLParser
import common
#Read configuration...
execfile('config.py')
# Check for a new version by looking at the Google market.
# Returns (None, "a message") if this didn't work, or (version, vercode) for
@ -66,6 +63,10 @@ def check_market(app):
def main():
#Read configuration...
execfile('config.py')
# Parse command line...
parser = OptionParser()
@ -111,3 +112,6 @@ for app in apps:
print "Finished."
if __name__ == "__main__":
main()

View file

@ -25,6 +25,8 @@ import re
import urllib
from optparse import OptionParser
def main():
# Read configuration...
repo_name = None
repo_description = None
@ -241,3 +243,7 @@ metafile = os.path.join('metadata', package + '.txt')
common.write_metadata(metafile, app)
print "Wrote " + metafile
if __name__ == "__main__":
main()

View file

@ -31,6 +31,8 @@ from optparse import OptionParser
import common
from common import BuildException
def main():
#Read configuration...
execfile('config.py')
@ -134,3 +136,7 @@ for apkfile in sorted(glob.glob(os.path.join(unsigned_dir, '*.apk'))):
print 'Published ' + apkfilename
if __name__ == "__main__":
main()

View file

@ -27,10 +27,11 @@ from optparse import OptionParser
import HTMLParser
import common
def main():
#Read configuration...
execfile('config.py')
# Parse command line...
parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False,
@ -46,3 +47,6 @@ for app in apps:
print "Finished."
if __name__ == "__main__":
main()

View file

@ -31,6 +31,8 @@ import common
from common import BuildException
from common import VCSException
def main():
# Read configuration...
execfile('config.py')
@ -108,3 +110,6 @@ for problem in problems:
print problem
print str(len(problems)) + ' problems.'
if __name__ == "__main__":
main()

View file

@ -29,6 +29,8 @@ from xml.dom.minidom import Document
from optparse import OptionParser
import time
def main():
# Read configuration...
repo_name = None
repo_description = None
@ -517,3 +519,6 @@ print str(apps_disabled) + " disabled"
print str(apps_nopkg) + " with no packages"
print str(warnings) + " warnings"
if __name__ == "__main__":
main()

View file

@ -30,10 +30,11 @@ import HTMLParser
import paramiko
import common
def main():
# Read configuration...
execfile('config.py')
# Parse command line...
parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False,
@ -148,3 +149,6 @@ if len(unknownapks) > 0:
print "Finished."
if __name__ == "__main__":
main()