Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tools/esp32-arduino-libs
tools/xtensa-esp-elf
tools/xtensa-esp32-elf
tools/xtensa-esp32s2-elf
tools/xtensa-esp32s3-elf
Expand Down
Binary file modified tools/get.exe
Binary file not shown.
6 changes: 4 additions & 2 deletions tools/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def unpack(filename, destination, force_extract, checksum): # noqa: C901
else:
print(" Forcing extraction")

if os.path.isdir(os.path.join(destination, rename_to)):
print("Removing existing {0} ...".format(rename_to))
shutil.rmtree(os.path.join(destination, rename_to), ignore_errors=True)

if filename.endswith("tar.gz"):
if not cfile:
cfile = tarfile.open(filename, "r:gz")
Expand All @@ -250,8 +254,6 @@ def unpack(filename, destination, force_extract, checksum): # noqa: C901

if rename_to != dirname:
print("Renaming {0} to {1} ...".format(dirname, rename_to))
if os.path.isdir(rename_to):
shutil.rmtree(rename_to)
shutil.move(dirname, rename_to)

with open(os.path.join(destination, rename_to, ".package_checksum"), "w") as f:
Expand Down