mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-18 16:06:30 +08:00
artiq_flash: expose scripts_path
This commit is contained in:
parent
454b48df97
commit
5fc3a52189
@ -11,6 +11,14 @@ from artiq import __artiq_dir__ as artiq_dir
|
|||||||
from artiq.frontend.bit2bin import bit2bin
|
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():
|
def get_argparser():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
@ -79,13 +87,6 @@ def main():
|
|||||||
raise SystemExit("Binaries directory '{}' does not exist"
|
raise SystemExit("Binaries directory '{}' does not exist"
|
||||||
.format(opts.dir))
|
.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
|
conv = False
|
||||||
|
|
||||||
prog = []
|
prog = []
|
||||||
|
Loading…
Reference in New Issue
Block a user