From adaa26202b965346566b5adff2fc5cee65955dfe Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 11 Nov 2020 13:16:27 +0800 Subject: [PATCH] macdeploy: remove existing Bitcoin-Core.dmg if present --- contrib/macdeploy/macdeployqtplus | 10 +++++----- 1 file 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") # ------------------------------------------------