Adding function to remove .setup_complete files.
This commit is contained in:
parent
bccb822eca
commit
b2beb5765b
2 changed files with 14 additions and 1 deletions
|
|
@ -204,7 +204,14 @@ def unzip_if_no_fonts(root_path=font_location):
|
|||
os.system(f'unzip {zip_file_path} -d {dir_path}')
|
||||
print(f"Unzipped {zip_file_path}")
|
||||
|
||||
|
||||
def remove_setup_complete_files(root_path=font_location):
|
||||
# walk through the root path directory and remove all files named ".setup_complete"
|
||||
for root, dirs, files in os.walk(root_path):
|
||||
for file in files:
|
||||
if file == '.setup_complete':
|
||||
file_path = os.path.join(root, file)
|
||||
os.remove(file_path)
|
||||
print(f"Removed .setup_complete file: {file_path}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
6
.fontfoldercleanup/remove_ds_and_clean_empty_folders.py
Normal file
6
.fontfoldercleanup/remove_ds_and_clean_empty_folders.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import cleanup
|
||||
|
||||
if __name__ == '__main__':
|
||||
cleanup.remove_ds_store_files()
|
||||
cleanup.remove_setup_complete_files()
|
||||
cleanup.remove_empty_folders()
|
||||
Loading…
Add table
Add a link
Reference in a new issue