bin/get-github-release: support tar.bz2 files

s3-about
Nick Craig-Wood 2019-10-01 14:04:23 +01:00
parent 77a520c97c
commit f73dae1e77
1 changed files with 3 additions and 0 deletions

View File

@ -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)