aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-05-31 20:15:52 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-05-31 20:15:52 +0000
commit07f719a2faec1fbb0656851a03d0a86455878814 (patch)
tree4051af795a492b5ab8c9669acf5c88ff79fc3c62 /stylesheets
parent574b0eabcc0015a1ee7c8b7098f50e2b6b0e9005 (diff)
Modified the patcheslist.xsl stylesheet to ouput a customizable shell script.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3732 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets')
-rw-r--r--stylesheets/patcheslist.xsl26
1 files changed, 22 insertions, 4 deletions
diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl
index 3d00d157d..d7900777e 100644
--- a/stylesheets/patcheslist.xsl
+++ b/stylesheets/patcheslist.xsl
@@ -1,20 +1,38 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
-<!-- This also work again BLFS -->
+<!-- This work against BLFS also -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
+ <xsl:param name="links.directory">lfs/cvs/unstable/</xsl:param>
+ <xsl:param name="deep.to.dowloads">../../../</xsl:param>
+
+ <xsl:template match="/">
+ <xsl:text>#! /bin/bash
+
+ cd /home/httpd/www.linuxfromscratch.org/patches/</xsl:text>
+ <xsl:value-of select="$links.directory"/>
+ <xsl:text> &amp;&amp;&#x0a;&#x0a;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#x0a; exit</xsl:text>
+ </xsl:template>
+
<xsl:template match="//text()">
<xsl:text/>
</xsl:template>
<xsl:template match="//ulink">
- <xsl:if test="contains(@url, '.patch')">
- <xsl:value-of select="@url"/>
- <xsl:text>&#x0a;</xsl:text>
+ <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
+ <xsl:text> ln -s </xsl:text>
+ <xsl:value-of select="$deep.to.dowloads"/>
+ <xsl:text>dowloads/</xsl:text>
+ <xsl:value-of select="substring-before (substring-after(@url, $links.directory), '-')"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="substring-after(@url, $links.directory)"/>
+ <xsl:text> &amp;&amp;&#x0a;</xsl:text>
</xsl:if>
</xsl:template>