summaryrefslogtreecommitdiff
path: root/ybd.py
diff options
context:
space:
mode:
Diffstat (limited to 'ybd.py')
-rwxr-xr-xybd.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ybd.py b/ybd.py
index a3e632e..c7d5b8c 100755
--- a/ybd.py
+++ b/ybd.py
@@ -19,6 +19,7 @@
import os
import sys
+import fcntl
import app
from assembly import assemble
from deployment import deploy
@@ -31,6 +32,12 @@ import sandboxlib
print('')
with app.timer('TOTAL'):
app.setup(sys.argv)
+
+ app.cleanup(app.config['tmp'])
+
+ lockfile = open(os.path.join(app.config['base'], 'lock'), 'r')
+ fcntl.flock(lockfile, fcntl.LOCK_SH | fcntl.LOCK_NB)
+
target = os.path.join(app.config['defdir'], app.config['target'])
app.log('TARGET', 'Target is %s' % target, app.config['arch'])
with app.timer('DEFINITIONS', 'parsing %s' % app.config['def-version']):