From 7bce2e6b796b787a0bf109a140ba935011924986 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Wed, 31 May 2017 21:35:06 +0200
Subject: [PATCH] .

---
 build.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.py b/build.py
index c8b26b1..4c266ff 100644
--- a/build.py
+++ b/build.py
@@ -3,7 +3,7 @@ from __future__ import print_function
 import json, sys
 import os.path
 
-def readin(path, func=bytes, orelse=None):
+def readin(path, func=bytes, orelse=None):  # read bytes from path and treat it with func. If path does not exist, return orelse
     if os.path.exists(path):
         with open(path, 'rb') as fin:
             return func(fin.read())
@@ -13,6 +13,7 @@ def readin(path, func=bytes, orelse=None):
 if __name__ == '__main__':
     header_bin = readin('src/header.md')
     footer_bin = readin('src/footer.md')
+    os.mkdir('dist')
 
     for lab_name in ('lab'+str(x) for x in xrange(7, 1)):
         dist_lp = 'dist/' + lab_name + '/'
@@ -23,7 +24,7 @@ if __name__ == '__main__':
             sys.exit()
 
         # Make directories
-        os.system('mkdir -p '+dist_lp)
+        os.system('mkdir '+dist_lp)
 
         # Load data
         data = readin('src/'+lab_name+'.json', json.load, orelse=[{}])
-- 
GitLab