r3578 - jhalfs/branches/ablfs/BLFS/xsl

pierre at linuxfromscratch.org pierre at linuxfromscratch.org
Mon Feb 27 02:47:39 PST 2012


Author: pierre
Date: 2012-02-27 03:47:30 -0700 (Mon, 27 Feb 2012)
New Revision: 3578

Modified:
   jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl
Log:
Added unpacking instruction for "zip"ped packages in generated scripts

Modified: jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl
===================================================================
--- jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl	2012-02-25 17:41:55 UTC (rev 3577)
+++ jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl	2012-02-27 10:47:30 UTC (rev 3578)
@@ -123,12 +123,18 @@
       </xsl:when>
       <xsl:when test="@role = 'installation'">
         <xsl:text>
-if [[ -e unpacked ]] ; then
+if [ "${PACKAGE%.zip}" = "${PACKAGE}" ]; then
+ if [[ -e unpacked ]] ; then
   UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
   [[ -n $UNPACKDIR ]] && [[ -d $UNPACKDIR ]] && rm -rf $UNPACKDIR
+ fi
+ tar -xvf $PACKAGE > unpacked
+ UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
+else
+ UNPACKDIR=${PACKAGE%.zip}
+ [[ -n $UNPACKDIR ]] && [[ -d $UNPACKDIR ]] && rm -rf $UNPACKDIR
+ unzip -d $UNPACKDIR ${PACKAGE}
 fi
-tar -xvf $PACKAGE > unpacked
-UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
 cd $UNPACKDIR&#xA;</xsl:text>
         <xsl:apply-templates select=".//screen | .//para/command"/>
         <xsl:if test="$sudo = 'y'">




More information about the alfs-log mailing list