Changed the pkgmngt part of lfs.xsl so that no script is created if

packageManager.xml has not <screen><userinput> nodes for that
This commit is contained in:
Pierre Labastie 2012-02-23 14:12:55 +00:00
parent 59364d06eb
commit 7e51281ea6

View file

@ -235,7 +235,7 @@ fi
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="sect1" mode="pkgmngt"> <xsl:template match="sect1" mode="pkgmngt">
<xsl:param name="dirname" select="chapter05"/> <xsl:param name="dirname" select="chapter05"/>
<!-- The build order --> <!-- The build order -->
<xsl:param name="order" select="062"/> <xsl:param name="order" select="062"/>
@ -244,35 +244,39 @@ fi
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/> <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
<xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/> <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
<!-- Creating dirs and files --> <!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{position()}-{$filename}" method="text"> <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
<xsl:text>#!/bin/bash count(descendant::screen/userinput) &gt;
count(descendant::screen[@role='nodump'])">
<exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
method="text">
<xsl:text>#!/bin/bash
set +h set +h
set -e set -e
cd $PKGDIR cd $PKGDIR
</xsl:text> </xsl:text>
<xsl:apply-templates <xsl:apply-templates
select=".//screen[not(@role) or @role != 'nodump']/userinput[@remap != 'adjust']" select=".//screen[not(@role) or
@role != 'nodump']/userinput[@remap != 'adjust']"
mode="pkgmngt"/> mode="pkgmngt"/>
<xsl:if test="$dirname = 'chapter06'"> <xsl:if test="$dirname = 'chapter06'">
<xsl:text>packInstall <xsl:text>packInstall
rm -rf $PKG_DEST rm -rf $PKG_DEST
</xsl:text> </xsl:text>
</xsl:if> </xsl:if>
<xsl:apply-templates <xsl:apply-templates
select=".//screen[ select=".//screen[not(@role) or
not(@role) or @role != 'nodump'
@role != 'nodump' ]/userinput[not(@remap) or
]/userinput[ @remap='adjust'
not(@remap) or
@remap='adjust'
]" ]"
mode="pkgmngt"/> mode="pkgmngt"/>
<xsl:text> <xsl:text>
echo -e "\n\nTotalseconds: $SECONDS\n" echo -e "\n\nTotalseconds: $SECONDS\n"
exit exit
</xsl:text> </xsl:text>
</exsl:document> </exsl:document>
</xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="userinput" mode="pkgmngt"> <xsl:template match="userinput" mode="pkgmngt">