aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets
diff options
context:
space:
mode:
authorMatthew Burgess <matthew@linuxfromscratch.org>2006-02-14 20:18:58 +0000
committerMatthew Burgess <matthew@linuxfromscratch.org>2006-02-14 20:18:58 +0000
commit3bf7cb6f015ca9589c976795311c00df186e7b5c (patch)
tree4edb61fc28764965534d9bdebf930c9c507b832e /stylesheets
parentddd554266cd757b9da553e430eeb408bf8bbc5c4 (diff)
Send an email to lfs-book if the patcheslist.xsl script produces errors. Thanks to Bruce Dubbs
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7373 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets')
-rw-r--r--stylesheets/patcheslist.xsl30
1 files changed, 21 insertions, 9 deletions
diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl
index 8f99b7c1f..3946ae52c 100644
--- a/stylesheets/patcheslist.xsl
+++ b/stylesheets/patcheslist.xsl
@@ -15,21 +15,33 @@
</xsl:param>
<xsl:template match="/">
- <xsl:text>#! /bin/bash&#x0a;&#x0a;</xsl:text>
- <xsl:text> umask 002&#x0a;&#x0a;</xsl:text>
+ <xsl:text>#! /bin/bash
+
+function copy
+{
+ cp $1 $2 >>copyerrs 2>&amp;1
+}
+
+umask 002 &#x0a;&#x0a;</xsl:text>
+
<!-- Create dest.dir if it don't exist -->
- <xsl:text> install -d -m 775 -g lfswww </xsl:text>
+ <xsl:text>install -d -m 775 -g lfswww </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &amp;&amp;&#x0a;</xsl:text>
- <xsl:text> cd </xsl:text>
+ <xsl:text>cd </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &amp;&amp;&#x0a;&#x0a;</xsl:text>
- <!-- Touch a dummy patch to prevent fails if dest dir is empty, then remove old patches -->
- <xsl:text> touch dummy.patch &amp;&amp;&#x0a; rm -f *.patch &amp;&amp;&#x0a;&#x0a;</xsl:text>
+ <!-- Remove old patches -->
+ <xsl:text>rm -f *.patch copyerrs &amp;&amp; &#x0a;&#x0a;</xsl:text>
<xsl:apply-templates/>
<!-- Ensure correct owneship -->
- <xsl:text>&#x0a; chgrp lfswww *.patch &amp;&amp;&#x0a;</xsl:text>
- <xsl:text>&#x0a; exit&#x0a;</xsl:text>
+ <xsl:text>&#x0a;chgrp lfswww *.patch &amp;&amp;&#x0a;</xsl:text>
+ <xsl:text>
+if [ `wc -l copyerrs | sed 's/ *//' | cut -f1 -d' '` -gt 0 ]; then
+ mail -s "Missing LFS patches" lfs-book@linuxfromscratch.org &lt; copyerrs
+fi&#x0a;&#x0a;</xsl:text>
+
+ <xsl:text>exit&#x0a;</xsl:text>
</xsl:template>
<xsl:template match="//text()"/>
@@ -46,7 +58,7 @@
<xsl:text>-</xsl:text>
<xsl:value-of select="$cut"/>
</xsl:variable>
- <xsl:text> cp /home/httpd/www.linuxfromscratch.org/patches/downloads/</xsl:text>
+ <xsl:text>copy /home/httpd/www.linuxfromscratch.org/patches/downloads/</xsl:text>
<xsl:value-of select="substring-before($patch.name2, '-0')"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="$patch.name"/>