From afe0bfe3447f31aca861d3c61f0ca7d21701b209 Mon Sep 17 00:00:00 2001 From: Fletcher Nichol Date: Wed, 22 Jun 2016 11:43:01 -0700 Subject: [PATCH] [hab] Make the `install.sh` script more portable with BusyBox userland. This change aims to make the gzip'd tarball extraction more portable in non-GNU userlands by first using `zcat` and then piping the stream to `tar` for extraction. This change allows for a better out-of-the-box experience in minimal distributions such as the BusyBox Docker image, Alpine Linux, etc. Signed-off-by: Fletcher Nichol --- components/hab/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/hab/install.sh b/components/hab/install.sh index 4b4645fdda..0b2579709f 100755 --- a/components/hab/install.sh +++ b/components/hab/install.sh @@ -47,7 +47,7 @@ fi sha256sum -c "$sha_file" # Extract the archive into a temporary directory -tar xf "$archive" -C "$workdir" +zcat "$archive" | tar x -C "$workdir" # Directory containing the binary archive_dir="$(echo $archive | sed 's/.tar.gz$//')" # Install latest hab release using the extracted version and add/update symlink