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 11
11
12
12
import scripts .utils as utils
13
13
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" )
19
17
20
18
class WikiBuilderError (Exception ):
21
19
def __init__ (self , message ):
@@ -27,6 +25,10 @@ def __init__(self, logger):
27
25
self .logger = logger
28
26
self .logger .info ('Initializing WikiBuilder' )
29
27
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
+
30
32
def build (self ):
31
33
self .clear ()
32
34
You can’t perform that action at this time.
0 commit comments