2024-06-15 13:02:01 +02:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
from shutil import rmtree
|
2024-06-17 10:55:05 +02:00
|
|
|
from os import remove, mkdir, path
|
|
|
|
|
|
|
|
BASE_DIR = 'data'
|
|
|
|
CHANNELS = ['release', 'testing']
|
2024-06-15 13:02:01 +02:00
|
|
|
|
|
|
|
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-17 10:55:05 +02:00
|
|
|
rmtree(BASE_DIR, ignore_errors=True)
|
|
|
|
mkdir(BASE_DIR)
|
|
|
|
for channel in CHANNELS:
|
|
|
|
mkdir(path.join(BASE_DIR, channel))
|
2024-06-15 13:02:01 +02:00
|
|
|
|
|
|
|
print('Reset complete')
|