mirror of https://github.com/m-labs/artiq.git
artiq_flash: do not needlessly look for artifacts
This commit is contained in:
parent
a1c97ec4dd
commit
3209197b0b
|
@ -293,8 +293,10 @@ def main():
|
||||||
if bin_dir is None:
|
if bin_dir is None:
|
||||||
bin_dir = os.path.join(artiq_dir, "board-support")
|
bin_dir = os.path.join(artiq_dir, "board-support")
|
||||||
|
|
||||||
|
needs_artifacts = any(action in args.action
|
||||||
|
for action in ["gateware", "bootloader", "firmware", "load"])
|
||||||
variant = args.variant
|
variant = args.variant
|
||||||
if variant is None:
|
if needs_artifacts and variant is None:
|
||||||
variants = []
|
variants = []
|
||||||
if args.srcbuild:
|
if args.srcbuild:
|
||||||
for entry in os.scandir(bin_dir):
|
for entry in os.scandir(bin_dir):
|
||||||
|
@ -317,10 +319,11 @@ def main():
|
||||||
else:
|
else:
|
||||||
raise ValueError("more than one variant found for selected board, specify -V. "
|
raise ValueError("more than one variant found for selected board, specify -V. "
|
||||||
"Found variants: {}".format(" ".join(sorted(variants))))
|
"Found variants: {}".format(" ".join(sorted(variants))))
|
||||||
if args.srcbuild:
|
if needs_artifacts:
|
||||||
variant_dir = variant
|
if args.srcbuild:
|
||||||
else:
|
variant_dir = variant
|
||||||
variant_dir = args.target + "-" + variant
|
else:
|
||||||
|
variant_dir = args.target + "-" + variant
|
||||||
|
|
||||||
if args.host is None:
|
if args.host is None:
|
||||||
client = LocalClient()
|
client = LocalClient()
|
||||||
|
|
Loading…
Reference in New Issue