forked from TrueCloudLab/rclone
bin/get-github-release: support tar.bz2 files
This commit is contained in:
parent
77a520c97c
commit
f73dae1e77
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"archive/tar"
|
"archive/tar"
|
||||||
|
"compress/bzip2"
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
|
@ -349,6 +350,8 @@ func untar(srcFile, fileName, extractDir string) {
|
||||||
log.Fatalf("Couldn't open gzip: %v", err)
|
log.Fatalf("Couldn't open gzip: %v", err)
|
||||||
}
|
}
|
||||||
in = gzf
|
in = gzf
|
||||||
|
} else if srcExt == ".bz2" {
|
||||||
|
in = bzip2.NewReader(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
tarReader := tar.NewReader(in)
|
tarReader := tar.NewReader(in)
|
||||||
|
|
Loading…
Add table
Reference in a new issue