- Timestamp:
- 04/09/2012 10:17:30 AM (13 years ago)
- Branches:
- ablfs
- Children:
- d721466
- Parents:
- d6f2ebf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/scripts.xsl
rd6f2ebf rf53dc4c 437 437 <xsl:when test="@role = 'root'"> 438 438 <xsl:if test="$sudo = 'y'"> 439 <xsl:text>sudo sh << ROOT_EOF
</xsl:text>439 <xsl:text>sudo -E sh << ROOT_EOF
</xsl:text> 440 440 </xsl:if> 441 <xsl:apply-templates select="userinput"mode="root"/>441 <xsl:apply-templates mode="root"/> 442 442 <xsl:if test="$sudo = 'y'"> 443 443 <xsl:text>
ROOT_EOF</xsl:text> … … 505 505 </xsl:template> 506 506 507 <xsl:template match="userinput" mode="root"> 508 <xsl:for-each select="child::node()"> 509 <xsl:choose> 510 <xsl:when test="self::text()"> 511 <xsl:call-template name="output-root"> 512 <xsl:with-param name="out-string" select="string()"/> 513 </xsl:call-template> 514 </xsl:when> 515 <xsl:otherwise> 516 <xsl:apply-templates select="self::node()"/> 517 </xsl:otherwise> 518 </xsl:choose> 519 </xsl:for-each> 507 <xsl:template match="text()" mode="root"> 508 <xsl:call-template name="output-root"> 509 <xsl:with-param name="out-string" select="string()"/> 510 </xsl:call-template> 520 511 </xsl:template> 521 512 … … 532 523 <xsl:with-param name="out-string" 533 524 select="substring-after($out-string,'make')"/> 525 </xsl:call-template> 526 </xsl:when> 527 <xsl:when test="contains($out-string,'$') and $sudo = 'y'"> 528 <xsl:call-template name="output-root"> 529 <xsl:with-param name="out-string" 530 select="substring-before($out-string,'$')"/> 531 </xsl:call-template> 532 <xsl:text>\$</xsl:text> 533 <xsl:call-template name="output-root"> 534 <xsl:with-param name="out-string" 535 select="substring-after($out-string,'$')"/> 534 536 </xsl:call-template> 535 537 </xsl:when> … … 568 570 </xsl:template> 569 571 572 <xsl:template match="replaceable" mode="root"> 573 <xsl:text>**EDITME</xsl:text> 574 <xsl:apply-templates/> 575 <xsl:text>EDITME**</xsl:text> 576 </xsl:template> 577 570 578 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.