diff options
| author | ruki <[email protected]> | 2024-08-21 23:36:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-08-21 23:36:25 +0800 |
| commit | de0ade770bc66add05cd3b654acf50bc8b17fe35 (patch) | |
| tree | e088183992b580da9a23ac741a50b62d23432080 /xmake/modules/utils/archive/extract.lua | |
| parent | 7f4a28767f1a2e9a9139a58e176c5032d157f032 (diff) | |
add xmz archive
Diffstat (limited to 'xmake/modules/utils/archive/extract.lua')
| -rw-r--r-- | xmake/modules/utils/archive/extract.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/modules/utils/archive/extract.lua b/xmake/modules/utils/archive/extract.lua index 604899300..3bb69ee1a 100644 --- a/xmake/modules/utils/archive/extract.lua +++ b/xmake/modules/utils/archive/extract.lua @@ -27,8 +27,15 @@ import("detect.tools.find_tar") import("detect.tools.find_gzip") import("detect.tools.find_unzip") import("detect.tools.find_bzip2") +import("extract_xmz") import("extension", {alias = "get_archive_extension"}) +-- extract archivefile using xmake decompress module +function _extract_using_xmz(archivefile, outputdir, extension, opt) + extract_xmz(archivefile, outputdir, opt) + return true +end + -- extract archivefile using tar function _extract_using_tar(archivefile, outputdir, extension, opt) @@ -394,7 +401,7 @@ function _extract(archivefile, outputdir, extension, extractors, opt) raise("cannot extract %s, %s!", path.filename(archivefile), errors or "extractors not found!") end --- extract archive file +-- extract file -- -- @param archivefile the archive file. e.g. *.tar.gz, *.zip, *.7z, *.tar.bz2, .. -- @param outputdir the output directory @@ -423,6 +430,7 @@ function main(archivefile, outputdir, opt) , [".tar.bz2"] = {_extract_using_7z, _extract_using_bzip2} , [".tar.lz"] = {_extract_using_7z} , [".tar.Z"] = {_extract_using_7z} + , [".xmz"] = {_extract_using_xmz} } else extractors = @@ -440,6 +448,7 @@ function main(archivefile, outputdir, opt) , [".tar.bz2"] = {_extract_using_tar, _extract_using_7z, _extract_using_bzip2} , [".tar.lz"] = {_extract_using_tar, _extract_using_7z} , [".tar.Z"] = {_extract_using_tar, _extract_using_7z} + , [".xmz"] = {_extract_using_xmz} } end |
