don't error if the necessary build directories already exist

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2024-06-24 15:35:14 -05:00
parent 6726233beb
commit 00a1bbc065
Signed by: bss
GPG Key ID: 3DE06D3180895FCB

View File

@ -26,7 +26,10 @@ os.chdir(SOURCE_DIR)
for root, dirs, files in os.walk('.'):
print(f"{root} {dirs} {files}")
# make the current directory so that openscad can write stuff into it
os.makedirs(os.path.join(BUILD_DIR, root))
try:
os.makedirs(os.path.join(BUILD_DIR, root))
except FileExistsError:
pass
input_dir = os.path.join(SOURCE_DIR, root)
output_dir = os.path.join(BUILD_DIR, root)