Skip to content

Instantly share code, notes, and snippets.

@luser
luser / gist:2829765
Created May 29, 2012 17:58 — forked from pnasrat/gist:935329
bob's install-name-tool.py
import macholib
def install_name_tool(fn, new_id=None, changedict=None):
m = macholib.MachO(fn)
if new_id:
m.rewriteInstallNameCommand(new_id)
if changedict:
m.rewriteLoadCommands(changedict)
m.save()
if __name__ == '__main__':