Made it create directorys

This commit is contained in:
OusmBlueNinja 2025-04-16 15:02:59 -05:00
parent 2a6632fd29
commit 32c5e4c8fc

View File

@ -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()