r2081 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Oct 5 13:27:05 PDT 2005


Author: manuel
Date: 2005-10-05 14:27:04 -0600 (Wed, 05 Oct 2005)
New Revision: 2081

Modified:
   jhalfs/trunk/dump-lfs-scripts.xsl
Log:
Changed the output format of "cat ... EOF" blocks to allow ampersands.

Modified: jhalfs/trunk/dump-lfs-scripts.xsl
===================================================================
--- jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-05 17:34:45 UTC (rev 2080)
+++ jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-05 20:27:04 UTC (rev 2081)
@@ -91,12 +91,21 @@
       <xsl:when test="string() = 'make check'">
         <xsl:text>make -k check</xsl:text>
       </xsl:when>
+      <xsl:when test="contains(string(),'EOF')">
+        <xsl:variable name="content">
+          <xsl:apply-templates/>
+        </xsl:variable>
+        <xsl:value-of select="substring-before(string($content), 'cat >')"/>
+        <xsl:text>&#xA;(&#xA;cat << EOF</xsl:text>
+        <xsl:value-of select="substring-after(string($content), '"EOF"')"/>
+        <xsl:text>&#xA;) ></xsl:text>
+        <xsl:value-of select="substring-after((substring-before(string($content), '<<')), 'cat >')"/>
+      </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
-    <xsl:if test="not(contains(string(),'EOF')) and
-            not(contains(string(),'check')) and
+    <xsl:if test="not(contains(string(),'check')) and
             not(contains(string(),'strip '))">
       <xsl:text> &&</xsl:text>
     </xsl:if>




More information about the alfs-log mailing list