Skip to content

Commit 46b127e

Browse files
authored
Merge pull request #745 from boegel/available_software_removed
start from scratch when generating software detail pages, since software may have been removed
2 parents faa7b71 + 445db73 commit 46b127e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/available_software/available_software.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@
2727
Python script to generate an overview of available modules across different clusters, in MarkDown format.
2828
2929
@author: Michiel Lachaert (Ghent University)
30+
@author: Lukas Barragan Torres (Ghent University)
31+
@author: Kenneth Hoste (Ghent University)
3032
"""
3133
import argparse
3234
import json
3335
import os
3436
import re
37+
import shutil
3538
import subprocess
3639
import time
3740
from pathlib import Path
@@ -403,6 +406,9 @@ def generate_detail_pages(json_path, dest_path, generated_time_yml) -> None:
403406
"""
404407
Generate all the detailed pages for all the software that is available.
405408
"""
409+
# cleanup target directory first, to start from scratch, since software may have been removed
410+
shutil.rmtree(dest_path)
411+
os.makedirs(dest_path)
406412

407413
with open(json_path) as json_data:
408414
data = json.load(json_data)

0 commit comments

Comments
 (0)