forked from M-Labs/artiq
1
0
Fork 0

artiq_flash: resolve openocd symbolic links

On NixOS, openocd may be a symlink in /run/current-system/sw/bin when installed system-wide.
This commit is contained in:
Sebastien Bourdeauducq 2019-03-08 12:43:06 +08:00
parent b2bee3da96
commit ed2d8dfa7a
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ def scripts_path():
if os.name == "nt": if os.name == "nt":
p.insert(0, "Library") p.insert(0, "Library")
p = os.path.abspath(os.path.join( p = os.path.abspath(os.path.join(
os.path.dirname(shutil.which("openocd")), os.path.dirname(os.path.realpath(shutil.which("openocd"))),
"..", *p)) "..", *p))
return p return p
@ -84,7 +84,7 @@ def scripts_path():
def proxy_path(): def proxy_path():
p = ["share", "bscan-spi-bitstreams"] p = ["share", "bscan-spi-bitstreams"]
p = os.path.abspath(os.path.join( p = os.path.abspath(os.path.join(
os.path.dirname(shutil.which("openocd")), os.path.dirname(os.path.realpath(shutil.which("openocd"))),
"..", *p)) "..", *p))
return p return p