mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge branch 'libarchive' of https://github.com/yorickvP/nix
This commit is contained in:
commit
ee235e764c
17 changed files with 128 additions and 182 deletions
|
@ -190,10 +190,7 @@ static int _main(int argc, char * * argv)
|
|||
printInfo("unpacking...");
|
||||
Path unpacked = (Path) tmpDir + "/unpacked";
|
||||
createDirs(unpacked);
|
||||
if (hasSuffix(baseNameOf(uri), ".zip"))
|
||||
runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked});
|
||||
else
|
||||
unpackTarfile(tmpFile, unpacked, std::string(baseNameOf(uri)));
|
||||
unpackTarfile(tmpFile, unpacked);
|
||||
|
||||
/* If the archive unpacks to a single file/directory, then use
|
||||
that as the top-level. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue