r2776 - jhalfs/branches/experimental/BLFS/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Jun 11 03:24:31 PDT 2006


Author: manuel
Date: 2006-06-11 04:24:31 -0600 (Sun, 11 Jun 2006)
New Revision: 2776

Modified:
   jhalfs/branches/experimental/BLFS/libs/scripts.xsl
Log:
Actually fixed the bug when generating scripts for non-package files, I think.

Modified: jhalfs/branches/experimental/BLFS/libs/scripts.xsl
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/scripts.xsl	2006-06-11 10:12:05 UTC (rev 2775)
+++ jhalfs/branches/experimental/BLFS/libs/scripts.xsl	2006-06-11 10:24:31 UTC (rev 2776)
@@ -47,15 +47,22 @@
         <!-- Creating dirs and files -->
       <exsl:document href="{$order}-{$filename}" method="text">
         <xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
-        <xsl:apply-templates select="sect2 | .//screen">
-          <xsl:with-param name="package" select="$package"/>
-          <xsl:with-param name="ftpdir" select="$ftpdir"/>
-        </xsl:apply-templates>
-        <xsl:if test="sect2[@role='package']">
-          <xsl:text>cd ~/sources/</xsl:text>
-          <xsl:value-of select="$ftpdir"/>
-          <xsl:text>&#xA;rm -rf $UNPACKDIR&#xA;&#xA;</xsl:text>
-        </xsl:if>
+        <xsl:choose>
+          <xsl:when test="sect2[@role='package']">
+            <xsl:apply-templates select="sect2">
+              <xsl:with-param name="package" select="$package"/>
+              <xsl:with-param name="ftpdir" select="$ftpdir"/>
+            </xsl:apply-templates>
+            <xsl:if test="sect2[@role='package']">
+              <xsl:text>cd ~/sources/</xsl:text>
+              <xsl:value-of select="$ftpdir"/>
+              <xsl:text>&#xA;rm -rf $UNPACKDIR&#xA;&#xA;</xsl:text>
+            </xsl:if>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select=".//screen"/>
+          </xsl:otherwise>
+        </xsl:choose>
         <xsl:text>exit</xsl:text>
       </exsl:document>
     </xsl:if>




More information about the alfs-log mailing list