Ensure that a cross-build directory for the given name exists.
(name: str, create: bool = False)
| 79 | |
| 80 | |
| 81 | def subdir(name: str, create: bool = False) -> Path: |
| 82 | """Ensure that a cross-build directory for the given name exists.""" |
| 83 | path = CROSS_BUILD_DIR / name |
| 84 | if not path.exists(): |
| 85 | if not create: |
| 86 | sys.exit( |
| 87 | f"{path} does not exist. Create it by running the appropriate " |
| 88 | f"`configure` subcommand of {SCRIPT_NAME}." |
| 89 | ) |
| 90 | else: |
| 91 | path.mkdir(parents=True) |
| 92 | return path |
| 93 | |
| 94 | |
| 95 | def run( |
no test coverage detected
searching dependent graphs…