source: stylesheets/patcheslist.xsl@ 70c1211

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 70c1211 was 70c1211, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tweak mail address for missing patches

  • Property mode set to 100644
File size: 3.8 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2<!DOCTYPE xsl:stylesheet [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6
7<!--
8 This stylesheet creates a script to copy the patches referenced
9 in the BLFS book from the patches repository to the blfs
10 download area. It is very specific to the installation on
11 the home server.
12-->
13
14<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15 version="1.0">
16
17 <xsl:output method="text"/>
18
19 <!-- Allow select the dest dir at runtime -->
20 <xsl:param name="dest.dir">
21 <xsl:value-of select="concat('/srv/www/', substring-after('&patch-root;', 'https://'))"/>
22 </xsl:param>
23
24 <xsl:template match="/">
25 <xsl:text>#! /bin/bash&#x0a;&#x0a;</xsl:text>
26 <xsl:text>function copy
27{
28 cp $1 $2 >>copyerrs 2>&amp;1
29}&#x0a;&#x0a;</xsl:text>
30 <!-- Create dest.dir if it don't exist -->
31 <xsl:text>mkdir -p </xsl:text>
32 <xsl:value-of select="$dest.dir"/>
33 <xsl:text> &amp;&amp;&#x0a;</xsl:text>
34 <xsl:text>cd </xsl:text>
35 <xsl:value-of select="$dest.dir"/>
36 <xsl:text> &amp;&amp;&#x0a;&#x0a;</xsl:text>
37 <!-- Remove old patches and possible list of missing patches-->
38 <xsl:text>rm -f *.patch copyerrs &amp;&amp;&#x0a;&#x0a;</xsl:text>
39 <xsl:apply-templates/>
40 <!-- Ensure correct ownership -->
41 <xsl:text>&#x0a;chgrp lfswww *.patch &amp;&amp;&#x0a;</xsl:text>
42 <xsl:text>if [ `wc -l copyerrs|sed 's/ *//' |cut -f1 -d' '` -gt 0 ]; then
43 mail -s "Missing BLFS patches" blfs-book@lists.linuxfromscratch.org &lt; copyerrs
44fi</xsl:text>
45 <xsl:text>&#x0a;exit&#x0a;</xsl:text>
46 </xsl:template>
47
48 <xsl:template match="//text()"/>
49
50 <xsl:template match="//ulink">
51 <!-- Match only local patches links and skip duplicated URLs splitted for PDF output-->
52 <xsl:if test="contains(@url, '.patch') and contains(@url, '&patch-root;')
53 and not(ancestor-or-self::*/@condition = 'pdf')">
54 <xsl:variable name="patch.name" select="substring-after(@url, '&patch-root;')"/>
55 <xsl:text>copy /srv/www/www.linuxfromscratch.org/patches/downloads</xsl:text>
56 <xsl:choose>
57 <!-- cdparanoia -->
58 <xsl:when test="contains($patch.name, '-III')">
59 <xsl:text>/cdparanoia</xsl:text>
60 </xsl:when>
61 <!-- Open Office -->
62 <xsl:when test="contains($patch.name, 'OOo')">
63 <xsl:text>/OOo</xsl:text>
64 </xsl:when>
65 <!-- QT -->
66 <xsl:when test="contains($patch.name, 'qt-x')">
67 <xsl:text>/qt</xsl:text>
68 </xsl:when>
69 <!-- XOrg -->
70 <xsl:when test="contains($patch.name, 'X11R6')">
71 <xsl:text>/xorg</xsl:text>
72 </xsl:when>
73 <!-- net-tools -->
74 <xsl:when test="contains($patch.name, 'net-tools')">
75 <xsl:text>/net-tools</xsl:text>
76 </xsl:when>
77 <!-- junit -->
78 <xsl:when test="contains($patch.name, 'junit')">
79 <xsl:text>/junit</xsl:text>
80 </xsl:when>
81 <!-- x265 -->
82 <xsl:when test="contains($patch.name, 'x265')">
83 <xsl:text>/x265</xsl:text>
84 </xsl:when>
85 <!-- node -->
86 <xsl:when test="contains($patch.name, 'node')">
87 <xsl:text>/node</xsl:text>
88 </xsl:when>
89 <!-- General rule -->
90 <xsl:otherwise>
91 <xsl:variable name="cut"
92 select="translate(substring-after($patch.name, '-'), '0123456789', '0000000000')"/>
93 <xsl:variable name="patch.name2">
94 <xsl:value-of select="substring-before($patch.name, '-')"/>
95 <xsl:text>-</xsl:text>
96 <xsl:value-of select="$cut"/>
97 </xsl:variable>
98 <xsl:value-of select="substring-before($patch.name2, '-0')"/>
99 </xsl:otherwise>
100 </xsl:choose>
101 <xsl:value-of select="$patch.name"/>
102 <xsl:text> . &#x0a;</xsl:text>
103 </xsl:if>
104 </xsl:template>
105
106</xsl:stylesheet>
107
Note: See TracBrowser for help on using the repository browser.