summaryrefslogtreecommitdiff
path: root/scripts/check-config
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-12-26 20:19:09 -0500
committerDaniil Baturin <daniil@baturin.org>2015-12-26 20:19:09 -0500
commit2f10d39a98eb4815e4b2d677e210febeed45b7ca (patch)
treee9c9a9e45198776eab22bdb532a38c78cd73c91d /scripts/check-config
parent90ca7062c19e7237d9e4f3fe9f442db2a99a7048 (diff)
downloadvyos-build-2f10d39a98eb4815e4b2d677e210febeed45b7ca.tar.gz
vyos-build-2f10d39a98eb4815e4b2d677e210febeed45b7ca.zip
Make the config existence check scripts try to actually load the JSON.
Diffstat (limited to 'scripts/check-config')
-rwxr-xr-xscripts/check-config9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/check-config b/scripts/check-config
index 58a1a3f..55d5467 100755
--- a/scripts/check-config
+++ b/scripts/check-config
@@ -22,14 +22,17 @@
import sys
-import os
+import json
import defaults
print("Checking build configuration")
-if not os.path.exists(defaults.BUILD_CONFIG):
- print("Build config does not exist")
+try:
+ with open(defaults.BUILD_CONFIG, 'r') as f:
+ build_config = json.load(f)
+except:
+ print("Build config does not exist or is not a valid JSON file")
print("Please run the ./configure script and try again")
sys.exit(1)