mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
buildserver: consolidate boxfile export code into one block
This is just for clarity, and moving more code into the main() function.
This commit is contained in:
parent
daade7656a
commit
299ed82a88
1 changed files with 3 additions and 4 deletions
|
|
@ -20,7 +20,6 @@ if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
boxfile = os.path.join(os.getcwd(), 'buildserver.box')
|
|
||||||
tail = None
|
tail = None
|
||||||
|
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
|
|
@ -69,9 +68,6 @@ elif os.path.exists('makebs.config.py'):
|
||||||
if '__builtins__' in config:
|
if '__builtins__' in config:
|
||||||
del(config['__builtins__']) # added by compile/exec
|
del(config['__builtins__']) # added by compile/exec
|
||||||
|
|
||||||
if os.path.exists(boxfile):
|
|
||||||
os.remove(boxfile)
|
|
||||||
|
|
||||||
# Update cached files.
|
# Update cached files.
|
||||||
cachedir = config['cachedir']
|
cachedir = config['cachedir']
|
||||||
if not os.path.exists(cachedir):
|
if not os.path.exists(cachedir):
|
||||||
|
|
@ -471,6 +467,9 @@ def main():
|
||||||
v.halt()
|
v.halt()
|
||||||
|
|
||||||
print("Packaging")
|
print("Packaging")
|
||||||
|
boxfile = os.path.join(os.getcwd(), 'buildserver.box')
|
||||||
|
if os.path.exists(boxfile):
|
||||||
|
os.remove(boxfile)
|
||||||
v.package(output=boxfile)
|
v.package(output=boxfile)
|
||||||
|
|
||||||
print("Adding box")
|
print("Adding box")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue