2004-05-08 15:19:53 +01:00
|
|
|
<?xml version='1.0' encoding='ISO-8859-1'?>
|
2004-08-13 21:22:01 +01:00
|
|
|
<!DOCTYPE xsl:stylesheet [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2004-05-08 15:19:53 +01:00
|
|
|
|
2004-08-13 21:22:01 +01:00
|
|
|
<!-- To work against BLFS some changes are needed -->
|
2004-05-08 15:19:53 +01:00
|
|
|
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
version="1.0">
|
|
|
|
|
2004-05-19 21:16:58 +01:00
|
|
|
<xsl:output method="text"/>
|
2004-05-08 15:19:53 +01:00
|
|
|
|
2004-08-13 21:22:01 +01:00
|
|
|
<xsl:param name="links.directory">
|
|
|
|
<xsl:value-of select="substring-after('&patches-root;', 'patches/')"/>
|
|
|
|
</xsl:param>
|
2004-05-31 21:15:52 +01:00
|
|
|
|
|
|
|
<xsl:template match="/">
|
2004-08-13 21:22:01 +01:00
|
|
|
<xsl:text>#! /bin/bash
</xsl:text>
|
|
|
|
<xsl:text>
 cd /home/httpd/</xsl:text>
|
|
|
|
<xsl:value-of select="substring-after('&patches-root;', 'http://')"/>
|
2004-05-31 21:15:52 +01:00
|
|
|
<xsl:text> &&

</xsl:text>
|
2004-05-31 21:47:27 +01:00
|
|
|
<xsl:text> rm -f *.patch &&

</xsl:text>
|
2004-05-31 21:15:52 +01:00
|
|
|
<xsl:apply-templates/>
|
2004-06-28 20:00:51 +01:00
|
|
|
<xsl:text>
 chgrp lfswww *.patch &&
</xsl:text>
|
2004-08-13 21:22:01 +01:00
|
|
|
<xsl:text>
 exit
</xsl:text>
|
2004-05-31 21:15:52 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2004-05-08 15:19:53 +01:00
|
|
|
<xsl:template match="//text()">
|
2004-05-19 21:16:58 +01:00
|
|
|
<xsl:text/>
|
2004-05-08 15:19:53 +01:00
|
|
|
</xsl:template>
|
|
|
|
|
2004-05-19 21:16:58 +01:00
|
|
|
<xsl:template match="//ulink">
|
2004-08-13 21:22:01 +01:00
|
|
|
<xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;')">
|
2004-06-05 17:52:39 +01:00
|
|
|
<xsl:text> cp </xsl:text>
|
2004-08-13 21:22:01 +01:00
|
|
|
<xsl:text>/home/httpd/</xsl:text>
|
|
|
|
<xsl:value-of select="substring-before (substring-after ('&patches-root;', 'http://'), $links.directory)"/>
|
2004-06-05 17:52:39 +01:00
|
|
|
<xsl:text>downloads/</xsl:text>
|
2004-06-08 23:03:28 +01:00
|
|
|
<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>
|
2004-06-28 20:00:51 +01:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="contains ($cut, '-src-2')">
|
|
|
|
<xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-src-2')"/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2004-06-08 23:03:28 +01:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:if>
|
2004-05-31 21:15:52 +01:00
|
|
|
<xsl:text>/</xsl:text>
|
|
|
|
<xsl:value-of select="substring-after(@url, $links.directory)"/>
|
2004-08-10 20:25:59 +01:00
|
|
|
<xsl:text> . 
</xsl:text>
|
2004-05-19 21:16:58 +01:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
2004-05-08 15:19:53 +01:00
|
|
|
|
|
|
|
</xsl:stylesheet>
|