Merge pull request #4815 from endrift/forward-port-deploy-mac

Tools: Fix recurring multiple times over the same library in deploy-mac.py
This commit is contained in:
Matthew Parlane 2017-02-04 10:08:06 +13:00 committed by GitHub
commit 6821733053
1 changed files with 3 additions and 1 deletions

View File

@ -96,6 +96,7 @@ def updateMachO(bin, execPath, root):
if os.access(newPath, os.F_OK):
if verbose:
print('Skipping copying {}, already done.'.format(oldPath))
newPath = None
elif os.path.abspath(oldPath) != os.path.abspath(newPath):
if verbose:
print('Copying {} to {}...'.format(oldPath, newPath))
@ -111,7 +112,8 @@ def updateMachO(bin, execPath, root):
args = [installNameTool]
for path, oldExecPath, newExecPath in toUpdate:
if path != bin:
updateMachO(path, execPath, root)
if path:
updateMachO(path, execPath, root)
if verbose:
print('Updating Mach-O load from {} to {}...'.format(oldExecPath, newExecPath))
args.extend(['-change', oldExecPath, newExecPath])