Skip to content

Commit

Permalink
artiq_flash: expose scripts_path
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jul 25, 2016
1 parent 454b48d commit 5fc3a52
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions artiq/frontend/artiq_flash.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,14 @@
from artiq.frontend.bit2bin import bit2bin


scripts_path = ["share", "openocd", "scripts"]
if os.name == "nt":
scripts_path.insert(0, "Library")
scripts_path = os.path.abspath(os.path.join(
os.path.dirname(shutil.which("openocd")),
"..", *scripts_path))


def get_argparser():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
@@ -79,13 +87,6 @@ def main():
raise SystemExit("Binaries directory '{}' does not exist"
.format(opts.dir))

scripts_path = ["share", "openocd", "scripts"]
if os.name == "nt":
scripts_path.insert(0, "Library")
scripts_path = os.path.abspath(os.path.join(
os.path.dirname(shutil.which("openocd")),
"..", *scripts_path))

conv = False

prog = []

0 comments on commit 5fc3a52

Please sign in to comment.