mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
buildserver: run dir check as very first thing
No point in running any other code if the script is just going to bail out with an error. This assumes that ./makebuildserver is only ever run from a git clone of fdroidserver.git.
This commit is contained in:
parent
a3d32c65a4
commit
1b09ab5a79
1 changed files with 5 additions and 4 deletions
|
@ -13,6 +13,11 @@ from clint.textui import progress
|
|||
from optparse import OptionParser
|
||||
|
||||
|
||||
if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'):
|
||||
print('This must be run as ./makebuildserver in fdroidserver.git!')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def vagrant(params, cwd=None, printout=False):
|
||||
"""Run vagrant.
|
||||
|
||||
|
@ -87,10 +92,6 @@ elif os.path.exists('makebs.config.py'):
|
|||
if '__builtins__' in config:
|
||||
del(config['__builtins__']) # added by compile/exec
|
||||
|
||||
if not os.path.exists('makebuildserver') or not os.path.exists(serverdir):
|
||||
print('This must be run from the correct directory!')
|
||||
sys.exit(1)
|
||||
|
||||
if os.path.exists(boxfile):
|
||||
os.remove(boxfile)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue