Skip to content

Commit 5b278b5

Browse files
Addendum
1 parent dd7a285 commit 5b278b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

migrate/oldwiki/copy_files.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import shutil
23

34
MIGRATE_FUNCTIONS = "./output/functions"
45
MIGRATE_EVENTS = "./output/events"
@@ -62,6 +63,11 @@ def copy_files(page_type, source_dir, target_dir):
6263

6364
if __name__ == "__main__":
6465
# Copy all generated YAML files from the old wiki migration to the definitive folders
66+
67+
if COPY_TO_TEMP_DIR:
68+
if os.path.exists(TEMP_DIR):
69+
shutil.rmtree(TEMP_DIR)
70+
os.makedirs(TEMP_DIR, exist_ok=True)
6571

6672
print("Copying functions...")
6773
copy_files('functions', MIGRATE_FUNCTIONS, OUTPUT_FUNCTIONS)

0 commit comments

Comments
 (0)