|
17 | 17 | assert REPO_PATH_SRC.exists(), f"'{REPO_PATH_SRC}' doesn't exist." |
18 | 18 |
|
19 | 19 | packages = { |
| 20 | + "bcf": REPO_PATH_SRC / "bcf" / "bcf", |
| 21 | + "bsdd.py": REPO_PATH_SRC / "bsdd" / "bsdd.py", |
| 22 | + "ifc4d": REPO_PATH_SRC / "ifc4d" / "ifc4d", |
| 23 | + "ifc5d": REPO_PATH_SRC / "ifc5d" / "ifc5d", |
| 24 | + "ifccityjson": REPO_PATH_SRC / "ifccityjson" / "ifccityjson", |
| 25 | + "ifcclash": REPO_PATH_SRC / "ifcclash" / "ifcclash", |
| 26 | + "ifccsv.py": REPO_PATH_SRC / "ifccsv" / "ifccsv.py", |
| 27 | + "ifcdiff.py": REPO_PATH_SRC / "ifcdiff" / "ifcdiff.py", |
| 28 | + "ifcfm": REPO_PATH_SRC / "ifcfm" / "ifcfm", |
20 | 29 | "ifcopenshell": REPO_PATH_SRC / "ifcopenshell-python" / "ifcopenshell", |
21 | 30 | "ifcpatch": REPO_PATH_SRC / "ifcpatch" / "ifcpatch", |
| 31 | + "ifctester": REPO_PATH_SRC / "ifctester" / "ifctester", |
22 | 32 | } |
23 | 33 |
|
24 | 34 |
|
|
35 | 45 | continue |
36 | 46 | package_path.unlink() |
37 | 47 | if package_path.exists(): |
38 | | - # I guess it's a directory. |
39 | | - shutil.rmtree(package_path) |
| 48 | + if package_path.is_dir(): |
| 49 | + shutil.rmtree(package_path) |
| 50 | + else: |
| 51 | + package_path.unlink() |
40 | 52 | print(f"Symlinking {package_path} -> {repo_package_path}") |
41 | | - package_path.symlink_to(repo_package_path, True) |
| 53 | + package_path.symlink_to(repo_package_path, target_is_directory=repo_package_path.is_dir()) |
42 | 54 |
|
43 | 55 |
|
44 | 56 | PACKAGE_PATH = SITE / "ifcopenshell" |
|
0 commit comments