Changeset 7e51281


Ignore:
Timestamp:
02/23/2012 02:12:55 PM (12 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs
Children:
96a30c7
Parents:
59364d0
Message:

Changed the pkgmngt part of lfs.xsl so that no script is created if
packageManager.xml has not <screen><userinput> nodes for that

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r59364d0 r7e51281  
    236236  </xsl:template>
    237237
    238 <xsl:template match="sect1" mode="pkgmngt">
     238  <xsl:template match="sect1" mode="pkgmngt">
    239239    <xsl:param name="dirname" select="chapter05"/>
    240240    <!-- The build order -->
     
    245245    <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
    246246     <!-- Creating dirs and files -->
    247     <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}" method="text">
    248       <xsl:text>#!/bin/bash
     247    <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
     248                  count(descendant::screen/userinput) &gt;
     249                      count(descendant::screen[@role='nodump'])">
     250      <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
     251                     method="text">
     252        <xsl:text>#!/bin/bash
    249253set +h
    250254set -e
     
    252256cd $PKGDIR
    253257</xsl:text>
    254       <xsl:apply-templates
    255            select=".//screen[not(@role) or @role != 'nodump']/userinput[@remap != 'adjust']"
     258        <xsl:apply-templates
     259           select=".//screen[not(@role) or
     260                            @role != 'nodump']/userinput[@remap != 'adjust']"
    256261           mode="pkgmngt"/>
    257       <xsl:if test="$dirname = 'chapter06'">
    258         <xsl:text>packInstall
     262        <xsl:if test="$dirname = 'chapter06'">
     263          <xsl:text>packInstall
    259264rm -rf $PKG_DEST
    260265</xsl:text>
    261       </xsl:if>
    262       <xsl:apply-templates
    263            select=".//screen[
    264               not(@role) or
    265               @role != 'nodump'
    266                             ]/userinput[
    267                                 not(@remap) or
    268                                 @remap='adjust'
     266        </xsl:if>
     267        <xsl:apply-templates
     268           select=".//screen[not(@role) or
     269                             @role != 'nodump'
     270                            ]/userinput[not(@remap) or
     271                                        @remap='adjust'
    269272                                       ]"
    270273           mode="pkgmngt"/>
    271       <xsl:text>
     274        <xsl:text>
    272275echo -e "\n\nTotalseconds: $SECONDS\n"
    273276exit
    274277</xsl:text>
    275     </exsl:document>
     278      </exsl:document>
     279    </xsl:if>
    276280  </xsl:template>
    277281
Note: See TracChangeset for help on using the changeset viewer.