mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fix_homebrew_paths_in_standalone_zip.py: Remove a superfluous call to open()
This commit is contained in:
parent
6b7857d56b
commit
941919e8ab
@ -44,21 +44,20 @@ import subprocess
|
||||
import sys
|
||||
|
||||
def readDependencies(fname):
|
||||
with open(fname) as f:
|
||||
with subprocess.Popen(['otool', '-L', fname], stdout=subprocess.PIPE) as o:
|
||||
for line in o.stdout:
|
||||
if line[0] == '\t':
|
||||
library = line.split(' ', 1)[0][1:]
|
||||
if (library.startswith("/usr/local/lib") or
|
||||
library.startswith("/usr/local/opt") or
|
||||
library.startswith("/Users/")):
|
||||
if (os.path.basename(library) != os.path.basename(fname)):
|
||||
command = "install_name_tool -change " + \
|
||||
library + " @executable_path/./" + \
|
||||
os.path.basename(library) + " " + fname
|
||||
print(command)
|
||||
os.system("chmod +w " + fname)
|
||||
os.system(command)
|
||||
with subprocess.Popen(['otool', '-L', fname], stdout=subprocess.PIPE) as o:
|
||||
for line in o.stdout:
|
||||
if line[0] == '\t':
|
||||
library = line.split(' ', 1)[0][1:]
|
||||
if (library.startswith("/usr/local/lib") or
|
||||
library.startswith("/usr/local/opt") or
|
||||
library.startswith("/Users/")):
|
||||
if (os.path.basename(library) != os.path.basename(fname)):
|
||||
command = "install_name_tool -change " + \
|
||||
library + " @executable_path/./" + \
|
||||
os.path.basename(library) + " " + fname
|
||||
print(command)
|
||||
os.system("chmod +w " + fname)
|
||||
os.system(command)
|
||||
|
||||
root = sys.argv[1]
|
||||
for (dirpath, dirnames, filenames) in os.walk(root):
|
||||
|
Loading…
Reference in New Issue
Block a user