aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/wget-list.xsl
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2006-12-04 16:53:22 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2006-12-04 16:53:22 +0000
commit35c837b42916725956a5f1ac526117f7a677c407 (patch)
tree8d300b84bab68cf2bbd998c643a1ea315775842e /stylesheets/wget-list.xsl
parent94428c3d47e0137635e4ba712887e036ca612c0f (diff)
Fixed wget-list.xsl to handle sourceforge downloads.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7882 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/wget-list.xsl')
-rw-r--r--stylesheets/wget-list.xsl12
1 files changed, 9 insertions, 3 deletions
diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl
index 6498ade1a..0b9da9932 100644
--- a/stylesheets/wget-list.xsl
+++ b/stylesheets/wget-list.xsl
@@ -1,8 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<!-- Create a list of upstream URLs for packages and patches to be used
- with wget.
- NOTE: there are several sourceforge URLs that don't work with wget. -->
+ with wget. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -20,7 +19,14 @@
<xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
or contains(@url, '.patch')) and
not(ancestor-or-self::*/@condition = 'pdf')">
- <xsl:value-of select="@url"/>
+ <xsl:choose>
+ <xsl:when test="contains(@url,'?download')">
+ <xsl:value-of select="substring-before(@url,'?download')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@url"/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>