mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +01:00
bin/get-github-release: support tar.bz2 files
This commit is contained in:
parent
77a520c97c
commit
f73dae1e77
@ -9,6 +9,7 @@ package main
|
||||
|
||||
import (
|
||||
"archive/tar"
|
||||
"compress/bzip2"
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
@ -349,6 +350,8 @@ func untar(srcFile, fileName, extractDir string) {
|
||||
log.Fatalf("Couldn't open gzip: %v", err)
|
||||
}
|
||||
in = gzf
|
||||
} else if srcExt == ".bz2" {
|
||||
in = bzip2.NewReader(f)
|
||||
}
|
||||
|
||||
tarReader := tar.NewReader(in)
|
||||
|
Loading…
Reference in New Issue
Block a user