realweather-metadata/reset.py

17 lines
307 B
Python
Raw Normal View History

2024-06-15 13:02:01 +02:00
#!/usr/bin/python3
from shutil import rmtree
from os import remove, mkdir
confirmation = input('If you really want to delete all releases, type CONFIRM: ')
2024-06-16 14:01:08 +02:00
2024-06-15 13:02:01 +02:00
if confirmation != 'CONFIRM':
print('Cancelled')
exit()
2024-06-16 14:01:08 +02:00
for dir in ['releases', 'latest']:
rmtree(dir)
mkdir(dir)
2024-06-15 13:02:01 +02:00
print('Reset complete')