aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/patcheslist.xsl
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-06-08 22:03:28 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-06-08 22:03:28 +0000
commit67c9eebe54837b7ee1a0c770d30f71926bc59ee8 (patch)
treedca58681cd405b316f739dcc4ece4440ad0227d5 /stylesheets/patcheslist.xsl
parent1582636bcd0852ddd8e16f35ad1229bdeffe7a66 (diff)
Adapted patcheslist.xsl to the new naming of patches.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3767 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/patcheslist.xsl')
-rw-r--r--stylesheets/patcheslist.xsl12
1 files changed, 11 insertions, 1 deletions
diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl
index 9945dee24..a4b934a5b 100644
--- a/stylesheets/patcheslist.xsl
+++ b/stylesheets/patcheslist.xsl
@@ -30,7 +30,17 @@
<xsl:text> cp </xsl:text>
<xsl:value-of select="$deep.to.downloads"/>
<xsl:text>downloads/</xsl:text>
- <xsl:value-of select="substring-before (substring-after(@url, $links.directory), '-')"/>
+ <xsl:if test="contains (@url, '-')">
+ <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/>
+ <xsl:choose>
+ <xsl:when test="contains ($cut, ',')">
+ <xsl:value-of select="substring-before (substring-after($cut, $links.directory), ',2')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
<xsl:text>/</xsl:text>
<xsl:value-of select="substring-after(@url, $links.directory)"/>
<xsl:text> . &amp;&amp;&#x0a;</xsl:text>