diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-08-13 20:22:01 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-08-13 20:22:01 +0000 |
commit | afa7fb19c57815a793ef7a06bbafe0c794bbc8a5 (patch) | |
tree | 25823f8316085ab8395e8fd4891ed473fa244bcf /stylesheets | |
parent | 4370eed7cb8d714e9373a8795a7f1adb963f34a9 (diff) |
patcheslist.xsl: Modified to avoid harcoded path into the stylesheets.
Now the paths in the output script are generated from the &patches-root; entitie sited in general.ent.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4036 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets')
-rw-r--r-- | stylesheets/patcheslist.xsl | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index 974f69ec4..674078f23 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -1,25 +1,29 @@ <?xml version='1.0' encoding='ISO-8859-1'?> +<!DOCTYPE xsl:stylesheet [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> -<!-- This work against BLFS also --> +<!-- To work against BLFS some changes are needed --> <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.downloads">../../../</xsl:param> + <xsl:param name="links.directory"> + <xsl:value-of select="substring-after('&patches-root;', 'patches/')"/> + </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>#! /bin/bash
</xsl:text> + <xsl:text>
 cd /home/httpd/</xsl:text> + <xsl:value-of select="substring-after('&patches-root;', 'http://')"/> <xsl:text> &&

</xsl:text> <xsl:text> rm -f *.patch &&

</xsl:text> <xsl:apply-templates/> <xsl:text>
 chgrp lfswww *.patch &&
</xsl:text> - <xsl:text>
 exit</xsl:text> + <xsl:text>
 exit
</xsl:text> </xsl:template> <xsl:template match="//text()"> @@ -27,9 +31,10 @@ </xsl:template> <xsl:template match="//ulink"> - <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')"> + <xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')"> <xsl:text> cp </xsl:text> - <xsl:value-of select="$deep.to.downloads"/> + <xsl:text>/home/httpd/</xsl:text> + <xsl:value-of select="substring-before (substring-after ('&patches-root;', 'http://'), $links.directory)"/> <xsl:text>downloads/</xsl:text> <xsl:if test="contains (@url, '-')"> <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/> |