Add logic for the case when MD5 sums are not immediately followed by </para>

in BLFS/xsl/scripts.xsl
This commit is contained in:
Pierre Labastie 2012-03-03 18:41:53 +00:00
parent 4fdb8bd089
commit 0aaeb8ec6e

View file

@ -309,8 +309,19 @@ mv ../${sect_ver}.md5.orig ../${sect_ver}.md5&#xA;</xsl:text>
<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>