mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
All callable scripts now implement main()
This commit is contained in:
parent
4e5b4fa77c
commit
00abc9527d
7 changed files with 970 additions and 936 deletions
|
@ -27,9 +27,6 @@ from optparse import OptionParser
|
||||||
import HTMLParser
|
import HTMLParser
|
||||||
import common
|
import common
|
||||||
|
|
||||||
#Read configuration...
|
|
||||||
execfile('config.py')
|
|
||||||
|
|
||||||
|
|
||||||
# Check for a new version by looking at the Google market.
|
# Check for a new version by looking at the Google market.
|
||||||
# Returns (None, "a message") if this didn't work, or (version, vercode) for
|
# 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...
|
# Parse command line...
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
|
@ -111,3 +112,6 @@ for app in apps:
|
||||||
|
|
||||||
print "Finished."
|
print "Finished."
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ import re
|
||||||
import urllib
|
import urllib
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
# Read configuration...
|
# Read configuration...
|
||||||
repo_name = None
|
repo_name = None
|
||||||
repo_description = None
|
repo_description = None
|
||||||
|
@ -241,3 +243,7 @@ metafile = os.path.join('metadata', package + '.txt')
|
||||||
common.write_metadata(metafile, app)
|
common.write_metadata(metafile, app)
|
||||||
print "Wrote " + metafile
|
print "Wrote " + metafile
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@ from optparse import OptionParser
|
||||||
import common
|
import common
|
||||||
from common import BuildException
|
from common import BuildException
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
#Read configuration...
|
#Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
|
@ -134,3 +136,7 @@ for apkfile in sorted(glob.glob(os.path.join(unsigned_dir, '*.apk'))):
|
||||||
|
|
||||||
print 'Published ' + apkfilename
|
print 'Published ' + apkfilename
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,11 @@ from optparse import OptionParser
|
||||||
import HTMLParser
|
import HTMLParser
|
||||||
import common
|
import common
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
#Read configuration...
|
#Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
|
|
||||||
# Parse command line...
|
# Parse command line...
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||||
|
@ -46,3 +47,6 @@ for app in apps:
|
||||||
|
|
||||||
print "Finished."
|
print "Finished."
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@ import common
|
||||||
from common import BuildException
|
from common import BuildException
|
||||||
from common import VCSException
|
from common import VCSException
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
# Read configuration...
|
# Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
|
@ -108,3 +110,6 @@ for problem in problems:
|
||||||
print problem
|
print problem
|
||||||
print str(len(problems)) + ' problems.'
|
print str(len(problems)) + ' problems.'
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@ from xml.dom.minidom import Document
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
# Read configuration...
|
# Read configuration...
|
||||||
repo_name = None
|
repo_name = None
|
||||||
repo_description = None
|
repo_description = None
|
||||||
|
@ -517,3 +519,6 @@ print str(apps_disabled) + " disabled"
|
||||||
print str(apps_nopkg) + " with no packages"
|
print str(apps_nopkg) + " with no packages"
|
||||||
print str(warnings) + " warnings"
|
print str(warnings) + " warnings"
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,11 @@ import HTMLParser
|
||||||
import paramiko
|
import paramiko
|
||||||
import common
|
import common
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
# Read configuration...
|
# Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
||||||
|
|
||||||
# Parse command line...
|
# Parse command line...
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||||
|
@ -148,3 +149,6 @@ if len(unknownapks) > 0:
|
||||||
|
|
||||||
print "Finished."
|
print "Finished."
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue