Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/macx
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2020-08-14 18:29:19 +0300
committerRobert Adam <dev@robert-adam.de>2020-08-14 23:03:47 +0300
commit32d685517e6051be1260cb399c8f552f18df2069 (patch)
tree2a456ae40fd3a8f76366134e6cf8f76e9872fe51 /macx
parent18b531b6b4228bb63d2cfc19efc989ce0d5bdf8e (diff)
FIX(packaging): Enable mac-script to run multiple times
Before this commit the MacOS packaging script failed on copying Codecs if the respective directory already existed (e.g. because the packaging script has been run before). Furthermore the script called a function to delete a directory (tree) on a file. This error never surfaced before because usually when this script is run, the respective file doesn't exist yet. Both issues are fixed by this commit. It is now possible to run the packaging script multiple times consecutively without it erroring on already existing files.
Diffstat (limited to 'macx')
-rwxr-xr-xmacx/scripts/osxdist.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/macx/scripts/osxdist.py b/macx/scripts/osxdist.py
index 4d3f1b4b6..12705d324 100755
--- a/macx/scripts/osxdist.py
+++ b/macx/scripts/osxdist.py
@@ -136,7 +136,8 @@ class AppBundle(object):
'''
print ' * Attempting to copy audio codec libraries into App Bundle'
dst = os.path.join(self.bundle, 'Contents', 'Codecs')
- os.makedirs(dst)
+ if not os.path.exists(dst):
+ os.makedirs(dst)
codecs = (os.path.join(options.binary_dir, 'libcelt0.0.7.0.dylib'), os.path.join(options.binary_dir, 'libopus.dylib'))
for codec in codecs:
if os.path.exists(codec):
@@ -247,7 +248,7 @@ class DiskImage(FolderObject):
'''
print ' * Creating diskimage. Please wait...'
if os.path.exists(self.filename):
- shutil.rmtree(self.filename)
+ os.remove(self.filename)
p = Popen(['hdiutil', 'create',
'-srcfolder', self.tmp,
'-format', 'UDBZ',