Made it create directorys
This commit is contained in:
parent
2a6632fd29
commit
32c5e4c8fc
@ -233,11 +233,27 @@ def clean():
|
||||
CACHE_FILE.unlink()
|
||||
info("Cache file cleared.")
|
||||
|
||||
|
||||
def ensure_directories():
|
||||
BUILD_DIR.mkdir(parents=True, exist_ok=True)
|
||||
LOG_FILE.parent.mkdir(parents=True, exist_ok=True)
|
||||
CACHE_FILE.parent.mkdir(parents=True, exist_ok=True)
|
||||
TARGET.parent.mkdir(parents=True, exist_ok=True) # <- ensure this!
|
||||
for dir in SRC_DIRS:
|
||||
Path(dir).mkdir(parents=True, exist_ok=True)
|
||||
for inc in INCLUDE_DIRS:
|
||||
Path(inc).mkdir(parents=True, exist_ok=True)
|
||||
for lib in LIB_DIRS:
|
||||
Path(lib).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
|
||||
|
||||
# ========== ENTRY ==========
|
||||
if __name__ == "__main__":
|
||||
start = time.time()
|
||||
LOG_FILE.write_text("", encoding="utf-8")
|
||||
|
||||
ensure_directories()
|
||||
try:
|
||||
if "clean" in sys.argv:
|
||||
clean()
|
||||
|
Loading…
Reference in New Issue
Block a user