r3586 - jhalfs/branches/ablfs/BLFS/xsl

pierre at linuxfromscratch.org pierre at linuxfromscratch.org
Sat Mar 3 10:41:58 PST 2012


Author: pierre
Date: 2012-03-03 11:41:53 -0700 (Sat, 03 Mar 2012)
New Revision: 3586

Modified:
   jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl
Log:
Add logic for the case when MD5 sums are not immediately followed by </para>
in BLFS/xsl/scripts.xsl

Modified: jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl
===================================================================
--- jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl	2012-03-03 17:02:26 UTC (rev 3585)
+++ jhalfs/branches/ablfs/BLFS/xsl/scripts.xsl	2012-03-03 18:41:53 UTC (rev 3586)
@@ -309,8 +309,19 @@
         <xsl:text>&#xA;  fi&#xA;fi&#xA;</xsl:text>
       </xsl:when>
       <xsl:when test="contains(string(),'MD5')">
+<!-- some md5 sums are written with a LF -->
+        <xsl:variable name="md5">
+          <xsl:choose>
+            <xsl:when test="contains(string(),'&#xA;')">
+              <xsl:value-of select="substring-before(substring-after(string(),'sum: '),'&#xA;')"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="substring-after(string(),'sum: ')"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
         <xsl:text>echo "</xsl:text>
-        <xsl:value-of select="substring-after(string(),'sum: ')"/>
+        <xsl:value-of select="$md5"/>
         <xsl:text>&#x20;&#x20;$PACKAGE" | md5sum -c -&#xA;</xsl:text>
       </xsl:when>
     </xsl:choose>




More information about the alfs-log mailing list