mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
67c9eebe54
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3767 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
51 lines
1.7 KiB
XML
51 lines
1.7 KiB
XML
<?xml version='1.0' encoding='ISO-8859-1'?>
|
|
|
|
<!-- 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.downloads">../../../</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> &&

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

</xsl:text>
|
|
<xsl:apply-templates/>
|
|
<xsl:text>
 exit</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="//text()">
|
|
<xsl:text/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="//ulink">
|
|
<xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
|
|
<xsl:text> cp </xsl:text>
|
|
<xsl:value-of select="$deep.to.downloads"/>
|
|
<xsl:text>downloads/</xsl:text>
|
|
<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> . &&
</xsl:text>
|
|
</xsl:if>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|