[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH 5/5] unpacker.eclass: Check makeself compression without a tempfile
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2022-09-28 20:59:07
Message-ID: 20220928205907.15979-6-mgorny () gentoo ! org
[Download RAW message or body]

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/unpacker.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index dfcb111e00f5..02000dd5d911 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
-- 
2.37.3


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic