Commit 026f957f13ea63ba98bcbb18f403cac525db1b76

SSE4 2019-02-22T03:09:50

- check status code Signed-off-by: SSE4 <tomskside@gmail.com>

diff --git a/build.py b/build.py
index 57da36a..53d7e7e 100644
--- a/build.py
+++ b/build.py
@@ -3,11 +3,17 @@
 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
 
 import os
+import sys
+
+def run(command)
+    status = os.system(command)
+    if 0 != status:
+        sys.exit(command)
 
 def main():
     generator = os.environ["CMAKE_GENERATOR"]
-    os.system('cmake . -G "%s"' % generator)
-    os.system('cmake --build . --config Release')
+    run('cmake . -G "%s"' % generator)
+    run('cmake --build . --config Release')
 
 if __name__ == '__main__':
     main()