[71fc777d] | 1 | <?xml version='1.0' encoding='ISO-8859-1'?>
|
---|
| 2 |
|
---|
| 3 | <!-- This work against BLFS also -->
|
---|
| 4 |
|
---|
| 5 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 6 | version="1.0">
|
---|
| 7 |
|
---|
| 8 | <xsl:output method="text"/>
|
---|
| 9 |
|
---|
| 10 | <xsl:param name="links.directory">blfs/cvs/</xsl:param>
|
---|
| 11 | <xsl:param name="deep.to.downloads">../../../</xsl:param>
|
---|
| 12 |
|
---|
| 13 | <xsl:template match="/">
|
---|
| 14 | <xsl:text>#! /bin/bash
|
---|
| 15 |
|
---|
| 16 | cd /home/httpd/www.linuxfromscratch.org/patches/</xsl:text>
|
---|
| 17 | <xsl:value-of select="$links.directory"/>
|
---|
| 18 | <xsl:text> &&

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

</xsl:text>
|
---|
| 20 | <xsl:apply-templates/>
|
---|
| 21 | <xsl:text>
 chgrp blfswww *.patch &&
</xsl:text>
|
---|
| 22 | <xsl:text>
 exit</xsl:text>
|
---|
| 23 | </xsl:template>
|
---|
| 24 |
|
---|
| 25 | <xsl:template match="//text()">
|
---|
| 26 | <xsl:text/>
|
---|
| 27 | </xsl:template>
|
---|
| 28 |
|
---|
| 29 | <xsl:template match="//ulink">
|
---|
| 30 | <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
|
---|
| 31 | <xsl:text> cp </xsl:text>
|
---|
| 32 | <xsl:value-of select="$deep.to.downloads"/>
|
---|
| 33 | <xsl:text>downloads/</xsl:text>
|
---|
| 34 | <xsl:if test="contains (@url, '-')">
|
---|
| 35 | <xsl:variable name="cut" select="translate (@url, '0123456789', '2222222222')"/>
|
---|
| 36 | <xsl:choose>
|
---|
| 37 | <xsl:when test="contains ($cut, ',')">
|
---|
| 38 | <xsl:value-of select="substring-before (substring-after($cut, $links.directory), ',2')"/>
|
---|
| 39 | </xsl:when>
|
---|
| 40 | <xsl:otherwise>
|
---|
| 41 | <xsl:choose>
|
---|
| 42 | <xsl:when test="contains ($cut, '-src-2')">
|
---|
| 43 | <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-src-2')"/>
|
---|
| 44 | </xsl:when>
|
---|
| 45 | <xsl:otherwise>
|
---|
| 46 | <xsl:value-of select="substring-before (substring-after($cut, $links.directory), '-2')"/>
|
---|
| 47 | </xsl:otherwise>
|
---|
| 48 | </xsl:choose>
|
---|
| 49 | </xsl:otherwise>
|
---|
| 50 | </xsl:choose>
|
---|
| 51 | </xsl:if>
|
---|
| 52 | <xsl:text>/</xsl:text>
|
---|
| 53 | <xsl:value-of select="substring-after(@url, $links.directory)"/>
|
---|
| 54 | <xsl:text> . &&
</xsl:text>
|
---|
| 55 | </xsl:if>
|
---|
| 56 | </xsl:template>
|
---|
| 57 |
|
---|
| 58 | </xsl:stylesheet>
|
---|