a patch to replace zipinfo with bsdunzip

"Zhang Wen" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sun, 16 Feb 2025 12:49:42 +0800
Newsgroups gmane.linux.lfs.automated
Message-ID <CAKjfnjqgt+8fnadSsqi7E2DogQUZa2C2EYqA-r86BTR1s5jrBQ@mail.gmail.com>
Not sure if there's a better way to do this, it seems tricky to use
awk and tail commands.

diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index 0bf4348..825fde1 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -349,7 +349,7 @@ case $PACKAGE in
      JH_UNPACKDIR=`head -n1 unpacked | cut  -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
      ;;
   *.zip)
-     zipinfo -1 $SRC_DIR/$PACKAGE &gt; unpacked
+     bsdunzip -1 $SRC_DIR/$PACKAGE|awk '{print $4}'|tail -n +3 &gt; unpacked
      JH_UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
      if test $(wc -w &lt;&lt;&lt; $JH_UNPACKDIR) -eq 1; then
        unzip $SRC_DIR/$PACKAGE

-- 
Key fingerprint:
419F 72F3 F3A9 36EE 1B72  B00B C1C3 4BD4 FDA3 362F

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
0001-replace-zipinfo-with-bsdunzip.patch (text/x-patch, 843 B)
From 9ca01b9151540c807d0d510ec55a65b474f14ee0 Mon Sep 17 00:00:00 2001
From: Zhang Wen <[email protected]>
Date: Sun, 16 Feb 2025 00:56:35 +0800
Subject: [PATCH] replace zipinfo with bsdunzip

---
 BLFS/xsl/scripts.xsl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index 0bf4348..825fde1 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -349,7 +349,7 @@ case $PACKAGE in
      JH_UNPACKDIR=`head -n1 unpacked | cut  -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
      ;;
   *.zip)
-     zipinfo -1 $SRC_DIR/$PACKAGE &gt; unpacked
+     bsdunzip -1 $SRC_DIR/$PACKAGE|awk '{print $4}'|tail -n +3 &gt; unpacked
      JH_UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
      if test $(wc -w &lt;&lt;&lt; $JH_UNPACKDIR) -eq 1; then
        unzip $SRC_DIR/$PACKAGE
-- 
2.48.1