commit: a1dac6c80c6d3c9be8109cfff7f1acc83881e4cf
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 28 08:58:18 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 1 17:19:35 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1dac6c8
unpacker.eclass: Check makeself compression without a tempfile
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/unpacker.eclass | 5 ++---
1 file 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