From 840a31de0e217f7908d3872b7cd76568ad28ccb1 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sun, 20 Jul 2014 19:45:00 +0200 Subject: [PATCH] macx/scripts: fix osxdist.py and build-installer-overlay to work in a source tree path with spaces in it. --- macx/scripts/build-overlay-installer | 4 ++-- macx/scripts/osxdist.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/macx/scripts/build-overlay-installer b/macx/scripts/build-overlay-installer index c5657c61d88..2d5f59118f4 100755 --- a/macx/scripts/build-overlay-installer +++ b/macx/scripts/build-overlay-installer @@ -39,8 +39,8 @@ root=$(mktemp -d -t mumble-overlay-installer) /usr/bin/xar -f release/synth.pkg -x -C ${root} mkdir -p ${root}/Resources cp icons/mumble.osx.installer.png ${root}/Resources/bg.png -VERSION=`defaults read $(pwd)/macx/osax/osax MumbleOverlayVersion` -MINCLIENT=`defaults read $(pwd)/macx/osax/osax MumbleOverlayMinMumbleVersion` +VERSION=`defaults read "${PWD}/macx/osax/osax" "MumbleOverlayVersion"` +MINCLIENT=`defaults read "${PWD}/macx/osax/osax" "MumbleOverlayMinMumbleVersion"` echo "" > ${root}/upgrade.xml sed -i '' -e 's,,Mumble Overlay,' ${root}/Distribution diff --git a/macx/scripts/osxdist.py b/macx/scripts/osxdist.py index e3f4612a11f..85770a17295 100755 --- a/macx/scripts/osxdist.py +++ b/macx/scripts/osxdist.py @@ -81,7 +81,10 @@ def create_overlay_package(): if options.developer_id: codesign(bundle) codesign(overlaylib) - os.system('./macx/scripts/build-overlay-installer') + p = Popen(('./macx/scripts/build-overlay-installer',)) + retval = p.wait() + if retval != 0: + raise Exception('build-overlay-installer failed') if options.developer_id: os.rename('release/MumbleOverlay.pkg', 'release/MumbleOverlayUnsigned.pkg') prodsign('release/MumbleOverlayUnsigned.pkg', 'release/MumbleOverlay.pkg') @@ -156,7 +159,10 @@ def add_compat_warning(self): The compat binary displays a warning dialog telling the user that they need to download a universal version of Mumble ''' print ' * Splicing Mumble.compat into main bundle executable' - os.system('lipo -create release/Mumble.compat -arch x86_64 %s -output %s' % (self.binary, self.binary)) + p = Popen(('lipo', '-create', 'release/Mumble.compat', '-arch', 'x86_64', self.binary, '-output', self.binary)) + retval = p.wait() + if retval != 0: + raise Exception('build-overlay-installer failed') def set_min_macosx_version(self, version): ''' @@ -325,7 +331,10 @@ def package_server(): name = 'Murmur-OSX-Static-%s' % ver # Fix .ini files - os.system('cd scripts && sh mkini.sh') + p = Popen(('bash', 'mkini.sh'), cwd='scripts') + retval = p.wait() + if retval != 0: + raise Exception('build-overlay-installer failed') destdir = os.path.join('release', name) if os.path.exists(destdir):