mirror of
https://github.com/vbatts/tar-split.git
synced 2024-12-18 19:46:29 +00:00
Merge pull request #49 from steveb/asm-compress
Add --compress flag to tar-split asm
This commit is contained in:
commit
620714a4c5
2 changed files with 11 additions and 0 deletions
|
@ -37,6 +37,12 @@ func CommandAsm(c *cli.Context) {
|
||||||
outputStream = fh
|
outputStream = fh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.Bool("compress") {
|
||||||
|
zipper := gzip.NewWriter(outputStream)
|
||||||
|
defer zipper.Close()
|
||||||
|
outputStream = zipper
|
||||||
|
}
|
||||||
|
|
||||||
// Get the tar metadata reader
|
// Get the tar metadata reader
|
||||||
mf, err := os.Open(c.String("input"))
|
mf, err := os.Open(c.String("input"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -69,6 +69,11 @@ func main() {
|
||||||
Value: "",
|
Value: "",
|
||||||
Usage: "relative path of extracted tar",
|
Usage: "relative path of extracted tar",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "compress",
|
||||||
|
Usage: "gzip compress the output",
|
||||||
|
// defaults to false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue