File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ python web/wikigen.py build
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ python web/wikigen.py build
Original file line number Diff line number Diff line change 1111
1212import scripts .utils as utils
1313
14- DOCS_REPO_PATH = os .path .abspath (os .path .join (os .getcwd (), "../" ))
15-
16- INPUT_RESOURCES_PATH = os .path .join (os .getcwd (), "resources/" )
17- OUTPUT_HTML_FOLDER = "output/html"
18- OUTPUT_HTML_PATH = os .path .join (os .getcwd (), OUTPUT_HTML_FOLDER )
14+ DOCS_REPO_PATH = os .getcwd () # Repository root
15+ INPUT_RESOURCES_PATH = os .path .join (DOCS_REPO_PATH , "web/resources" )
16+ OUTPUT_HTML_PATH = os .path .join (DOCS_REPO_PATH , "web/output/html" )
1917
2018class WikiBuilderError (Exception ):
2119 def __init__ (self , message ):
@@ -27,6 +25,10 @@ def __init__(self, logger):
2725 self .logger = logger
2826 self .logger .info ('Initializing WikiBuilder' )
2927
28+ parent_folder = os .path .basename (os .path .dirname (DOCS_REPO_PATH ))
29+ if parent_folder == 'web' or parent_folder == 'tools' :
30+ raise WikiBuilderError ('ABORTING! Script must be executed from the root directory of the repository!' )
31+
3032 def build (self ):
3133 self .clear ()
3234
You can’t perform that action at this time.
0 commit comments