Skip to content

Commit e16ad08

Browse files
committed
mkdir -> makedirs for toolchains
1 parent 420782e commit e16ad08

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/genExamples.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@
7171
os.path.expanduser(f"~/.pico-sdk/toolchain/{ARM_TOOLCHAIN_VERSION}")
7272
):
7373
toolchain_url = config[ARM_TOOLCHAIN_VERSION][platform]
74-
os.mkdir(os.path.expanduser(f"~/.pico-sdk/toolchain/{ARM_TOOLCHAIN_VERSION}"))
74+
os.makedirs(
75+
os.path.expanduser(f"~/.pico-sdk/toolchain/{ARM_TOOLCHAIN_VERSION}"),
76+
exist_ok=True,
77+
)
7578
os.system(f"wget {toolchain_url}")
7679
os.system(
7780
f"tar -xf {toolchain_url.split('/')[-1]} --strip-components 1 -C ~/.pico-sdk/toolchain/{ARM_TOOLCHAIN_VERSION}"
@@ -83,7 +86,10 @@
8386
os.path.expanduser(f"~/.pico-sdk/toolchain/{RISCV_TOOLCHAIN_VERSION}")
8487
):
8588
toolchain_url = config[RISCV_TOOLCHAIN_VERSION][platform]
86-
os.mkdir(os.path.expanduser(f"~/.pico-sdk/toolchain/{RISCV_TOOLCHAIN_VERSION}"))
89+
os.makedirs(
90+
os.path.expanduser(f"~/.pico-sdk/toolchain/{RISCV_TOOLCHAIN_VERSION}"),
91+
exist_ok=True,
92+
)
8793
os.system(f"wget {toolchain_url}")
8894
os.system(
8995
f"tar -xf {toolchain_url.split('/')[-1]} -C ~/.pico-sdk/toolchain/{RISCV_TOOLCHAIN_VERSION}"

0 commit comments

Comments
 (0)