mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
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:
parent
b2bee3da96
commit
ed2d8dfa7a
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user