forked from M-Labs/artiq
artiq_flash: make scripts_path a function (for doc generating)
This commit is contained in:
parent
f7dec72f02
commit
653eee071d
|
@ -11,10 +11,11 @@ from artiq import __artiq_dir__ as artiq_dir
|
|||
from artiq.frontend.bit2bin import bit2bin
|
||||
|
||||
|
||||
scripts_path = ["share", "openocd", "scripts"]
|
||||
if os.name == "nt":
|
||||
def scripts_path():
|
||||
scripts_path = ["share", "openocd", "scripts"]
|
||||
if os.name == "nt":
|
||||
scripts_path.insert(0, "Library")
|
||||
scripts_path = os.path.abspath(os.path.join(
|
||||
scripts_path = os.path.abspath(os.path.join(
|
||||
os.path.dirname(shutil.which("openocd")),
|
||||
"..", *scripts_path))
|
||||
|
||||
|
@ -139,7 +140,7 @@ def main():
|
|||
target_file = opts.target_file
|
||||
subprocess.check_call([
|
||||
"openocd",
|
||||
"-s", scripts_path,
|
||||
"-s", scripts_path(),
|
||||
"-f", target_file,
|
||||
"-c", "; ".join(prog),
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue