add new migrate_data step to move old folder

This commit is contained in:
Nick Sweeting 2018-06-10 23:01:56 -04:00
parent 9c56848645
commit aa5a674a17
2 changed files with 12 additions and 0 deletions

View file

@ -360,6 +360,14 @@ def fix_folder_path(archive_path, link_folder, link):
run(['rm', '-R', source])
def migrate_data():
# migrate old folder to new OUTPUT folder
old_dir = os.path.join(REPO_DIR, 'html')
if os.path.exists(old_dir):
print('[!] WARNING: Moved old output folder "html" to new location: {}'.format(OUTPUT_DIR))
run(['mv', old_dir, OUTPUT_DIR], timeout=10)
def cleanup_archive(archive_path, links):
"""move any incorrectly named folders to their canonical locations"""