Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def bundle(self, target = None):
""" make sure that everything target links to is in the bundle """
if target == None:
self.bundle(self.exepath)
return
lib_file = os.popen('otool -LX ' + target)
assert(lib_file)
for l in lib_file:
id = l.strip().split()[0] # get the link id of the library
for prefix in Bundler.LOCALS:
if id.startswith(prefix):
self.addlib(id, target)
lib_file.close()
def main():
global bundle, bundleapp, libpath, libprefix, executable
assert(len(sys.argv) > 2)
bundler = Bundler(sys.argv[1], sys.argv[2])
bundler.bundle()