macdeploy: remove existing Bitcoin-Core.dmg if present

This commit is contained in:
fanquake 2020-11-11 13:16:27 +08:00
parent ccb0325b1b
commit adaa26202b
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 5 additions and 5 deletions

View File

@ -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")
# ------------------------------------------------