Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dn-build19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/dn-build b/scripts/dn-build
index df9c414..14daf33 100755
--- a/scripts/dn-build
+++ b/scripts/dn-build
@@ -37,6 +37,15 @@ module_files = { "activities": ["activities.json"],
state = { "built_modules": {} }
+def load_state():
+ global state
+
+ if os.path.exists(build_state_path):
+ state = json.load(open(build_state_path))
+
+def save_state():
+ json.dump(state, open(build_state_path, "w+"))
+
def add_path(name, path):
if name not in os.environ:
os.environ[name] = path
@@ -131,6 +140,7 @@ def build(module):
sys.exit(1)
state["built_modules"][module["name"]] = get_module_commit_id(module)
+ save_state()
def cmd_build():
modules = []
@@ -226,15 +236,6 @@ def setup_dirs():
if not os.path.exists(dir):
os.mkdir(dir)
-def load_state():
- global state
-
- if os.path.exists(build_state_path):
- state = json.load(open(build_state_path))
-
-def save_state():
- json.dump(state, open(build_state_path, "w+"))
-
def main():
load_state()