fix check for existing rpaths

This commit is contained in:
2024-09-15 19:59:50 -05:00
parent b870cd4230
commit 68d3ef931a

View File

@@ -43,14 +43,11 @@ for binary, dependencies in dependency_map.items():
has_rpath = False
lines = reversed(subprocess.check_output(["otool", "-l", binary], text=True).splitlines())
for line in lines:
print(f'LINE: `{line}`')
if line.strip().startswith('path '):
existing_rpath = line.strip()[len('path '):line.strip().find('(') - 1]
print(f'EXISTING RPATH: `{existing_rpath}`')
if existing_rpath == new_rpath:
has_rpath = True
else:
break
break
if not has_rpath:
print('\tAdding rpath: ' + new_rpath)
if not dry_run: