Change clean to keep folders
This commit is contained in:
parent
d683ab022f
commit
f87d891cf2
1 changed files with 6 additions and 2 deletions
8
umake.py
8
umake.py
|
|
@ -61,8 +61,12 @@ def make(config: Config):
|
||||||
|
|
||||||
# Clean action
|
# Clean action
|
||||||
if arguments.clean:
|
if arguments.clean:
|
||||||
shutil.rmtree(config.OBJECT_DIR, ignore_errors=True)
|
if config.OBJECT_DIR.exists():
|
||||||
shutil.rmtree(config.BIN_DIR, ignore_errors=True)
|
for object_entry in config.OBJECT_DIR.iterdir():
|
||||||
|
shutil.rmtree(object_entry, ignore_errors=True)
|
||||||
|
if config.BIN_DIR.exists():
|
||||||
|
for binary_entry in config.BIN_DIR.iterdir():
|
||||||
|
shutil.rmtree(binary_entry, ignore_errors=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if config.PRE_COMPILE_FUNCTION is not None:
|
if config.PRE_COMPILE_FUNCTION is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue