From 24890dd0016b21c3ae9c843fa8f2241d7c6d9517 Mon Sep 17 00:00:00 2001 From: aothms Date: Sun, 28 Nov 2021 14:07:11 +0000 Subject: [PATCH] build-all.py option NO_CLEAN --- nix/build-all.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nix/build-all.py b/nix/build-all.py index dd41f20e18..accf8cf1ea 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -664,13 +664,12 @@ if "cgal" in targets: cecho("Building IfcOpenShell:", GREEN) IFCOS_DIR = os.path.join(DEPS_DIR, "build", "ifcopenshell") -if os.path.exists(IFCOS_DIR): - shutil.rmtree(IFCOS_DIR) -os.makedirs(IFCOS_DIR) - +if os.environ.get("NO_CLEAN", "").lower() not in {"1", "on", "true"}: + if os.path.exists(IFCOS_DIR): + shutil.rmtree(IFCOS_DIR) +os.makedirs(IFCOS_DIR, exist_ok=True) executables_dir = os.path.join(IFCOS_DIR, "executables") -if not os.path.exists(executables_dir): - os.makedirs(executables_dir) +os.makedirs(executables_dir, exist_ok=True) logger.info("\rConfiguring executables...")