mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
build/windows: Restrict clean() output of bundling script
This is the python version of c748b3d2
This commit is contained in:
parent
a683495b09
commit
f88ca87ca9
1 changed files with 4 additions and 1 deletions
|
@ -46,10 +46,13 @@ def bundle(src_root, pattern):
|
|||
|
||||
def clean(base_path, pattern):
|
||||
base_path = Path(base_path)
|
||||
first_found = False
|
||||
for parent_path in base_path.glob(os.path.dirname(pattern)):
|
||||
for path in parent_path.rglob(os.path.basename(pattern)):
|
||||
if path.exists():
|
||||
print(f"Cleaning {path}")
|
||||
if not first_found:
|
||||
print(f"Cleaning {base_path}/{pattern}")
|
||||
first_found = True
|
||||
if path.is_dir():
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue