Ignore:
Timestamp:
10/15/2005 03:40:23 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
aebe03a
Parents:
0fd8a9d
Message:

Replaced && by set -e.
Removed now unneeded XSL code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dump-lfs-scripts.xsl

    r0fd8a9d rfd691b4  
    5252                    @id='ch-system-creatingdirs' or
    5353                    @id='ch-system-createfiles'">
    54             <xsl:text>#!/tools/bin/bash&#xA;&#xA;</xsl:text>
     54            <xsl:text>#!/tools/bin/bash&#xA;set -e&#xA;&#xA;</xsl:text>
     55          </xsl:when>
     56          <xsl:when test="@id='ch-tools-stripping' or
     57                    @id='ch-system-strippingagain'">
     58            <xsl:text>#!/bin/sh&#xA;</xsl:text>
    5559          </xsl:when>
    5660          <xsl:otherwise>
    57             <xsl:text>#!/bin/sh&#xA;&#xA;</xsl:text>
     61            <xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
    5862          </xsl:otherwise>
    5963        </xsl:choose>
     
    6165                @id='ch-tools-adjusting' or
    6266                @id='ch-system-readjusting'">
    63           <xsl:text>cd $PKGDIR &amp;&amp;&#xA;</xsl:text>
     67          <xsl:text>cd $PKGDIR&#xA;</xsl:text>
    6468        </xsl:if>
    6569        <xsl:apply-templates select=".//para/userinput | .//screen"/>
     
    8791      <xsl:text>make -k</xsl:text>
    8892      <xsl:value-of select="substring-after(string(),'make')"/>
    89       <xsl:text> &#xA;</xsl:text>
     93      <xsl:text> || true&#xA;</xsl:text>
    9094    </xsl:if>
    9195  </xsl:template>
     
    9397  <xsl:template match="userinput" mode="screen">
    9498    <xsl:choose>
    95       <xsl:when test="string() = 'make mrproper'">
    96         <xsl:text>make mrproper &amp;&amp;&#xA;</xsl:text>
    97         <xsl:text>cp -v ../kernel-config .config &amp;&amp;&#xA;</xsl:text>
    98       </xsl:when>
     99      <!-- Estandarized package formats -->
    99100      <xsl:when test="contains(string(),'tar.gz')">
    100101        <xsl:value-of select="substring-before(string(),'tar.gz')"/>
    101102        <xsl:text>tar.bz2</xsl:text>
    102103        <xsl:value-of select="substring-after(string(),'tar.gz')"/>
    103         <xsl:text> &amp;&amp;&#xA;</xsl:text>
     104        <xsl:text>&#xA;</xsl:text>
    104105      </xsl:when>
     106      <!-- Avoiding a race condition in a patch -->
     107      <xsl:when test="contains(string(),'debian_fixes')">
     108        <xsl:value-of select="substring-before(string(),'patch')"/>
     109        <xsl:text>patch -Z</xsl:text>
     110        <xsl:value-of select="substring-after(string(),'patch')"/>
     111        <xsl:text>&#xA;</xsl:text>
     112      </xsl:when>
     113      <!-- Copying the kernel config file -->
     114      <xsl:when test="string() = 'make mrproper'">
     115        <xsl:text>make mrproper&#xA;</xsl:text>
     116        <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
     117      </xsl:when>
     118      <!-- The Coreutils test suite is optional -->
    105119      <xsl:when test="$testsuite = '0' and
    106120                ancestor::sect1[@id='ch-system-coreutils'] and
    107121                (contains(string(),'check') or
    108122                contains(string(),'dummy'))"/>
     123      <!-- Fixing toolchain test suites run -->
    109124      <xsl:when test="string() = 'make check' or
    110125                string() = 'make -k check'">
     
    112127          <xsl:when test="$toolchaintest = '0'"/>
    113128          <xsl:otherwise>
    114             <xsl:text>make -k check</xsl:text>
     129            <xsl:text>make -k check || true</xsl:text>
    115130            <xsl:text>&#xA;</xsl:text>
    116131          </xsl:otherwise>
    117132        </xsl:choose>
    118133      </xsl:when>
    119       <xsl:when test="contains(string(),'glibc-check-log') or
    120                 contains(string(),'test_summary') or
     134      <xsl:when test="contains(string(),'glibc-check-log')">
     135        <xsl:choose>
     136          <xsl:when test="$toolchaintest = '0'"/>
     137          <xsl:otherwise>
     138            <xsl:value-of select="substring-before(string(),'&#xA;')"/>
     139            <xsl:text> || true&#xA;</xsl:text>
     140            <xsl:value-of select="substring-after(string(),'&#xA;')"/>
     141            <xsl:text>&#xA;</xsl:text>
     142          </xsl:otherwise>
     143        </xsl:choose>
     144      </xsl:when>
     145      <xsl:when test="contains(string(),'test_summary') or
    121146                contains(string(),'expect -c')">
    122147        <xsl:choose>
     
    124149          <xsl:otherwise>
    125150            <xsl:apply-templates/>
    126             <xsl:text> &amp;&amp;&#xA;</xsl:text>
     151            <xsl:text>&#xA;</xsl:text>
    127152          </xsl:otherwise>
    128153        </xsl:choose>
    129154      </xsl:when>
    130       <xsl:when test="contains(string(),'EOF')">
    131         <xsl:value-of select="substring-before(string(),'cat &gt;')"/>
    132         <xsl:text>&#xA;(&#xA;cat &lt;&lt; EOF&#xA;</xsl:text>
    133         <xsl:apply-templates select="literal"/>
    134         <xsl:text>&#xA;EOF&#xA;) &gt;</xsl:text>
    135         <xsl:value-of select="substring-after((substring-before(string(),'&lt;&lt;')),'cat &gt;')"/>
    136         <xsl:text> &amp;&amp;&#xA;</xsl:text>
    137         <xsl:if test="string-length(substring-after(string(),'EOF&#xA;')) &gt; 0">
    138           <xsl:value-of select="substring-after(string(),'EOF&#xA;')"/>
    139           <xsl:text> &amp;&amp;&#xA;</xsl:text>
    140         </xsl:if>
     155      <!-- Don't stop on strip run -->
     156      <xsl:when test="contains(string(),'strip ')">
     157        <xsl:apply-templates/>
     158        <xsl:text> || true&#xA;</xsl:text>
    141159      </xsl:when>
    142       <xsl:when test="contains(string(),'debian_fixes')">
    143         <xsl:value-of select="substring-before(string(),'patch')"/>
    144         <xsl:text>patch -Z</xsl:text>
    145         <xsl:value-of select="substring-after(string(),'patch')"/>
    146         <xsl:text> &amp;&amp;&#xA;</xsl:text>
    147       </xsl:when>
     160      <!-- The rest of commands -->
    148161      <xsl:otherwise>
    149162        <xsl:apply-templates/>
    150         <xsl:if test="not(contains(string(),'check')) and
    151                 not(contains(string(),'strip '))">
    152           <xsl:text> &amp;&amp;</xsl:text>
    153         </xsl:if>
    154163        <xsl:text>&#xA;</xsl:text>
    155       </xsl:otherwise>
    156     </xsl:choose>
    157   </xsl:template>
    158 
    159   <xsl:template match="literal">
    160     <xsl:choose>
    161       <xsl:when test="contains(string(),'$@')">
    162         <xsl:variable name="content">
    163           <xsl:apply-templates/>
    164         </xsl:variable>
    165         <xsl:value-of select="substring-before(string($content),'$@')"/>
    166         <xsl:text>\$@</xsl:text>
    167         <xsl:value-of select="substring-after(string($content),'$@')"/>
    168       </xsl:when>
    169       <xsl:otherwise>
    170         <xsl:apply-templates/>
    171164      </xsl:otherwise>
    172165    </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.