mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
tools: idf_tools.py: add support for .tar.xz archives
This commit is contained in:
@@ -295,6 +295,8 @@ def unpack(filename, destination): # type: (str, str) -> None
|
|||||||
info('Extracting {0} to {1}'.format(filename, destination))
|
info('Extracting {0} to {1}'.format(filename, destination))
|
||||||
if filename.endswith(('.tar.gz', '.tgz')):
|
if filename.endswith(('.tar.gz', '.tgz')):
|
||||||
archive_obj = tarfile.open(filename, 'r:gz') # type: Union[TarFile, ZipFile]
|
archive_obj = tarfile.open(filename, 'r:gz') # type: Union[TarFile, ZipFile]
|
||||||
|
elif filename.endswith(('.tar.xz')):
|
||||||
|
archive_obj = tarfile.open(filename, 'r:xz')
|
||||||
elif filename.endswith('zip'):
|
elif filename.endswith('zip'):
|
||||||
archive_obj = ZipFile(filename)
|
archive_obj = ZipFile(filename)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user