diff options
author | fanquake <fanquake@gmail.com> | 2020-11-11 13:16:27 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-11-30 14:54:20 +0800 |
commit | adaa26202b965346566b5adff2fc5cee65955dfe (patch) | |
tree | 5db8a461b406d1f70d5f852d629f772526bb54ca | |
parent | ccb0325b1bd1cee5a76382a16901dc80ea8f50d8 (diff) |
macdeploy: remove existing Bitcoin-Core.dmg if present
-rwxr-xr-x | contrib/macdeploy/macdeployqtplus | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 2b744e936a..0349e423bd 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -523,6 +523,7 @@ verbose = config.verbose # ------------------------------------------------ app_bundle = config.app_bundle[0] +appname = config.appname[0] if not os.path.exists(app_bundle): sys.stderr.write("Error: Could not find app bundle \"{}\"\n".format(app_bundle)) @@ -531,13 +532,12 @@ if not os.path.exists(app_bundle): # ------------------------------------------------ if os.path.exists("dist"): - print("+ Removing old dist folder +") - + print("+ Removing existing dist folder +") shutil.rmtree("dist") -# ------------------------------------------------ - -appname = config.appname[0] +if os.path.exists(appname + ".dmg"): + print("+ Removing existing DMG +") + os.unlink(appname + ".dmg") # ------------------------------------------------ |