2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 11:48:27 +08:00

artiq_flash: make scripts_path a function (for doc generating)

This commit is contained in:
Robert Jördens 2017-01-26 17:53:33 +01:00
parent b4df00009b
commit d16f5ce540

View File

@ -11,6 +11,7 @@ from artiq import __artiq_dir__ as artiq_dir
from artiq.frontend.bit2bin import bit2bin from artiq.frontend.bit2bin import bit2bin
def scripts_path():
scripts_path = ["share", "openocd", "scripts"] scripts_path = ["share", "openocd", "scripts"]
if os.name == "nt": if os.name == "nt":
scripts_path.insert(0, "Library") scripts_path.insert(0, "Library")
@ -139,7 +140,7 @@ def main():
target_file = opts.target_file target_file = opts.target_file
subprocess.check_call([ subprocess.check_call([
"openocd", "openocd",
"-s", scripts_path, "-s", scripts_path(),
"-f", target_file, "-f", target_file,
"-c", "; ".join(prog), "-c", "; ".join(prog),
]) ])