mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 10:18:47 +00:00
add lzop/zlma/lzip/zstd unpack compress options.
Signed-off-by: rektide de la faye <rektide@voodoowarez.com> Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
This commit is contained in:
committed by
Dylan Aïssi
parent
a494e5e218
commit
d7135c3787
@@ -27,7 +27,7 @@ The default value is 'artifacts' directory in case if this property is omitted.
|
||||
|
||||
- compression -- optional hint for unpack allowing to use proper compression method.
|
||||
|
||||
Currently only 'gz', bzip2' and 'xz' compression types are supported.
|
||||
Currently 'bzip2', 'gz', 'lzip', 'lzma', 'lzop', 'xz' and 'zstd' compression types are supported.
|
||||
If not provided an attempt to autodetect the compression type will be done.
|
||||
*/
|
||||
package actions
|
||||
|
||||
11
archiver.go
11
archiver.go
@@ -83,10 +83,13 @@ func unpack(command []string, destination string) error {
|
||||
// Returns empty string for unknown
|
||||
func tarOptions(compression string) string {
|
||||
unpackTarOpts := map[string]string{
|
||||
"gz": "-z",
|
||||
"bzip2": "-j",
|
||||
"xz": "-J",
|
||||
"zstd": "--zstd",
|
||||
"bzip2": "--bzip2",
|
||||
"gz": "--gzip",
|
||||
"lzip": "--lzip",
|
||||
"lzma": "--lzma",
|
||||
"lzop": "--lzop",
|
||||
"xz": "--xz",
|
||||
"zstd": "--zstd",
|
||||
} // Trying to guess all other supported compression types
|
||||
|
||||
return unpackTarOpts[compression]
|
||||
|
||||
Reference in New Issue
Block a user