Skip to content

Commit

Permalink
ci: force reinstall gd openocd if --force passed
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <578567190@qq.com>
  • Loading branch information
fanghuaqi committed Jan 4, 2024
1 parent 222e055 commit e7819c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def setup_gd_openocd(toolsdir, gd_openocd_uri, system_value, nsideloc, reuse, fo
print("This %s may not be a valid openocd package!" % (org_folder))
sys.exit(1)
# Rename the old openocd folder to gd_openocd
if os.path.isdir(destination_folder) == False:
if os.path.isdir(destination_folder) == False or force == True:
if force == True and os.path.isdir(destination_folder):
print("Remove existing %s" % (destination_folder))
shutil.rmtree(destination_folder)
print("Copy %s -> %s" % (org_folder, destination_folder))
shutil.copytree(org_folder, destination_folder)
else:
Expand Down

0 comments on commit e7819c5

Please # to comment.