Skip to content

Commit 5fc3a52

Browse files
committedJul 25, 2016
artiq_flash: expose scripts_path
1 parent 454b48d commit 5fc3a52

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

Diff for: ‎artiq/frontend/artiq_flash.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
from artiq.frontend.bit2bin import bit2bin
1212

1313

14+
scripts_path = ["share", "openocd", "scripts"]
15+
if os.name == "nt":
16+
scripts_path.insert(0, "Library")
17+
scripts_path = os.path.abspath(os.path.join(
18+
os.path.dirname(shutil.which("openocd")),
19+
"..", *scripts_path))
20+
21+
1422
def get_argparser():
1523
parser = argparse.ArgumentParser(
1624
formatter_class=argparse.RawDescriptionHelpFormatter,
@@ -79,13 +87,6 @@ def main():
7987
raise SystemExit("Binaries directory '{}' does not exist"
8088
.format(opts.dir))
8189

82-
scripts_path = ["share", "openocd", "scripts"]
83-
if os.name == "nt":
84-
scripts_path.insert(0, "Library")
85-
scripts_path = os.path.abspath(os.path.join(
86-
os.path.dirname(shutil.which("openocd")),
87-
"..", *scripts_path))
88-
8990
conv = False
9091

9192
prog = []

0 commit comments

Comments
 (0)
Please sign in to comment.