diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-09-28 10:58:18 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-01 19:19:35 +0200 |
commit | a1dac6c80c6d3c9be8109cfff7f1acc83881e4cf (patch) | |
tree | a58c46449a87017a12524cd1977586970cc99798 /eclass/unpacker.eclass | |
parent | eclass/tests/unpacker.sh: Add tests for makeself (diff) | |
download | gentoo-a1dac6c80c6d3c9be8109cfff7f1acc83881e4cf.tar.gz gentoo-a1dac6c80c6d3c9be8109cfff7f1acc83881e4cf.tar.bz2 gentoo-a1dac6c80c6d3c9be8109cfff7f1acc83881e4cf.zip |
unpacker.eclass: Check makeself compression without a tempfile
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/unpacker.eclass')
-rw-r--r-- | eclass/unpacker.eclass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 3011f2fc44ad..3d8bf7a8452d 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -243,9 +243,8 @@ unpack_makeself() { esac # lets grab the first few bytes of the file to figure out what kind of archive it is - local decomp= filetype suffix tmpfile="${T}/${FUNCNAME}" - "${exe[@]}" 2>/dev/null | head -c 512 > "${tmpfile}" - filetype=$(file -b "${tmpfile}") || die + local decomp= filetype suffix + filetype=$("${exe[@]}" 2>/dev/null | head -c 512 | file -b -) || die case ${filetype} in *tar\ archive*) decomp=cat |