summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-22 00:57:43 +0800
committerruki <[email protected]>2018-09-21 23:46:19 +0800
commit180e96c3759ab7e80e18d3ab445945d8c758e01a (patch)
treef1937cc046a89baa3fcc4a85cc29bd879455b2c3
parent77f1de5eea59bef799343336c960e9983ffd5cf5 (diff)
extract .tgz
-rw-r--r--xmake/actions/require/action/install.lua3
-rw-r--r--xmake/modules/utils/archive/extract.lua1
2 files changed, 4 insertions, 0 deletions
diff --git a/xmake/actions/require/action/install.lua b/xmake/actions/require/action/install.lua
index 3b58c2986..8339238e4 100644
--- a/xmake/actions/require/action/install.lua
+++ b/xmake/actions/require/action/install.lua
@@ -126,6 +126,9 @@ function main(package)
oldir = os.cd(srcdir)
break
end
+ if not oldir and os.isdir(path.join(workdir, "source")) then
+ oldir = os.cd(path.join(workdir, "source"))
+ end
end
if not oldir then
os.mkdir(workdir)
diff --git a/xmake/modules/utils/archive/extract.lua b/xmake/modules/utils/archive/extract.lua
index 076119dec..720f179b6 100644
--- a/xmake/modules/utils/archive/extract.lua
+++ b/xmake/modules/utils/archive/extract.lua
@@ -262,6 +262,7 @@ function main(archivefile, outputdir)
[".zip"] = {_extract_using_unzip, _extract_using_tar, _extract_using_7z}
, [".7z"] = {_extract_using_7z}
, [".gz"] = {_extract_using_gzip, _extract_using_tar, _extract_using_7z}
+ , [".tgz"] = {_extract_using_tar, _extract_using_7z}
, [".bz2"] = {_extract_using_tar, _extract_using_7z}
, [".tar"] = {_extract_using_tar, _extract_using_7z}
, [".tar.gz"] = {_extract_using_tar, _extract_using_gzip, _extract_using_7z}