r2927 - jhalfs/trunk/BLFS/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Aug 12 07:27:36 PDT 2006


Author: manuel
Date: 2006-08-12 08:27:36 -0600 (Sat, 12 Aug 2006)
New Revision: 2927

Modified:
   jhalfs/trunk/BLFS/libs/scripts.xsl
Log:
Remove existing sources dir due failed build.

Modified: jhalfs/trunk/BLFS/libs/scripts.xsl
===================================================================
--- jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-12 13:19:29 UTC (rev 2926)
+++ jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-12 14:27:36 UTC (rev 2927)
@@ -102,7 +102,7 @@
             </xsl:apply-templates>
             <!-- Clean-up -->
             <xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
-            <xsl:text>rm -rf $UNPACKDIR&#xA;&#xA;</xsl:text>
+            <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
           </xsl:when>
           <!-- Non-package page -->
           <xsl:otherwise>
@@ -131,9 +131,15 @@
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>
       <xsl:when test="@role = 'installation'">
-        <xsl:text>tar -xvf $PACKAGE > unpacked&#xA;</xsl:text>
-        <xsl:text>UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`&#xA;</xsl:text>
-        <xsl:text>cd $UNPACKDIR&#xA;</xsl:text>
+        <xsl:text>
+if [[ -e unpacked ]] ; then
+  UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
+  rm -rf $UNPACKDIR
+fi
+tar -xvf $PACKAGE > unpacked
+UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
+cd $UNPACKDIR
+          </xsl:text>
         <xsl:apply-templates select=".//screen | .//para/command"/>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>




More information about the alfs-log mailing list