[ded6ddd] | 1 | <?xml version='1.0' encoding='ISO-8859-1'?>
|
---|
| 2 |
|
---|
[07f719a] | 3 | <!-- This work against BLFS also -->
|
---|
[ded6ddd] | 4 |
|
---|
| 5 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 6 | version="1.0">
|
---|
| 7 |
|
---|
[a9e89d0] | 8 | <xsl:output method="text"/>
|
---|
[ded6ddd] | 9 |
|
---|
[fd01247] | 10 | <xsl:param name="links.directory">lfs/cvs/testing/</xsl:param>
|
---|
[b5aa3c2] | 11 | <xsl:param name="deep.to.downloads">../../../</xsl:param>
|
---|
[07f719a] | 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>
|
---|
[f18c5aa] | 19 | <xsl:text> rm -f *.patch &&

</xsl:text>
|
---|
[07f719a] | 20 | <xsl:apply-templates/>
|
---|
[7a4ac0e] | 21 | <xsl:text>
 chgrp lfswww *.patch &&
</xsl:text>
|
---|
[07f719a] | 22 | <xsl:text>
 exit</xsl:text>
|
---|
| 23 | </xsl:template>
|
---|
| 24 |
|
---|
[ded6ddd] | 25 | <xsl:template match="//text()">
|
---|
[a9e89d0] | 26 | <xsl:text/>
|
---|
[ded6ddd] | 27 | </xsl:template>
|
---|
| 28 |
|
---|
[a9e89d0] | 29 | <xsl:template match="//ulink">
|
---|
[07f719a] | 30 | <xsl:if test="contains(@url, '.patch') and contains(@url, 'linuxfromscratch')">
|
---|
[b5aa3c2] | 31 | <xsl:text> cp </xsl:text>
|
---|
| 32 | <xsl:value-of select="$deep.to.downloads"/>
|
---|
| 33 | <xsl:text>downloads/</xsl:text>
|
---|
[67c9eebe] | 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>
|
---|
[7a4ac0e] | 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>
|
---|
[67c9eebe] | 49 | </xsl:otherwise>
|
---|
| 50 | </xsl:choose>
|
---|
| 51 | </xsl:if>
|
---|
[07f719a] | 52 | <xsl:text>/</xsl:text>
|
---|
| 53 | <xsl:value-of select="substring-after(@url, $links.directory)"/>
|
---|
[b5aa3c2] | 54 | <xsl:text> . &&
</xsl:text>
|
---|
[a9e89d0] | 55 | </xsl:if>
|
---|
| 56 | </xsl:template>
|
---|
[ded6ddd] | 57 |
|
---|
| 58 | </xsl:stylesheet>
|
---|