From c1336e8175e3d80d3a5c2537d63194abaf56a434 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Tue, 22 Jun 2021 15:19:56 -0500 Subject: [PATCH] Hopefully this works now. --- tools/python/check_if_need_to_extract.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/python/check_if_need_to_extract.py b/tools/python/check_if_need_to_extract.py index 2031888f..f3037513 100644 --- a/tools/python/check_if_need_to_extract.py +++ b/tools/python/check_if_need_to_extract.py @@ -29,8 +29,15 @@ else: if md5Calculated != md5Saved: needToExtract = True +def run_until_done(args): + subprocess.run(args) + if needToExtract: md5Calculated = hashlib.md5(FileUtil.get_bytes_from_file(extractConfigFilename)).hexdigest() FileUtil.write_text_to_file(configChecksumFilename, md5Calculated) - subprocess.run(['./extract.sh', version]) + print('Extracting...') + run_until_done(['make', 'clean']) + run_until_done(['rm', '-Rf', 'assets']) + run_until_done(['rm', '-Rf', 'ucode']) + run_until_done(['./extract.sh', version]) \ No newline at end of file