Changeset 945ccaa for BLFS/xsl/scripts.xsl
- Timestamp:
- 04/09/2017 10:29:32 AM (7 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- cee84ad
- Parents:
- 909ee37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/scripts.xsl
r909ee37 r945ccaa 21 21 </xsl:choose> 22 22 </xsl:variable> 23 24 <!-- Wrap "root" commands inside a wrapper function, allowing 25 "porg style" package management --> 26 <xsl:param name="wrap-install" select="'n'"/> 23 27 24 28 <!-- Build as user (y) or as root (n)? --> … … 70 74 <!-- Package page --> 71 75 <xsl:when test="sect2[@role='package']"> 72 <!-- We build in a subdirectory --> 73 <xsl:text>PKG_DIR=</xsl:text> 76 <!-- We build in a subdirectory, whose name may be needed 77 if using package management (see envars.conf), so 78 "export" it --> 79 <xsl:text>export PKG_DIR=</xsl:text> 74 80 <xsl:value-of select="$filename"/> 75 81 <xsl:text> … … 150 156 ;; 151 157 esac 158 export UNPACKDIR 152 159 cd $UNPACKDIR
 153 160 </xsl:text> … … 408 415 <xsl:choose> 409 416 <xsl:when test="@role = 'root'"> 410 <xsl:if test="$sudo = 'y'"> 411 <xsl:text>sudo -E sh << ROOT_EOF
</xsl:text> 417 <xsl:if test="not(preceding-sibling::screen[1][@role='root'])"> 418 <xsl:if test="$sudo = 'y'"> 419 <xsl:text>sudo -E sh << ROOT_EOF
</xsl:text> 420 </xsl:if> 421 <xsl:if test="$wrap-install = 'y' and 422 ancestor::sect2[@role='installation']"> 423 <xsl:text>if [ -r "$PACK_INSTALL" ]; then 424 source $PACK_INSTALL 425 export -f wrapInstall 426 export -f packInstall 427 fi 428 wrapInstall ' 429 </xsl:text> 430 </xsl:if> 412 431 </xsl:if> 413 432 <xsl:apply-templates mode="root"/> 414 <xsl:if test="$sudo = 'y'"> 415 <xsl:text>
ROOT_EOF</xsl:text> 433 <xsl:if test="not(following-sibling::screen[1][@role='root'])"> 434 <xsl:if test="$wrap-install = 'y' and 435 ancestor::sect2[@role='installation']"> 436 <xsl:text>'
packInstall</xsl:text> 437 </xsl:if> 438 <xsl:if test="$sudo = 'y'"> 439 <xsl:text>
ROOT_EOF</xsl:text> 440 </xsl:if> 416 441 </xsl:if> 417 442 </xsl:when> … … 515 540 </xsl:template> 516 541 542 <xsl:variable name="APOS">'</xsl:variable> 543 517 544 <xsl:template name="output-root"> 518 545 <xsl:param name="out-string" select="''"/> … … 562 589 </xsl:call-template> 563 590 </xsl:when> 591 <xsl:when test="contains($out-string,string($APOS)) 592 and $wrap-install = 'y' 593 and ancestor::sect2[@role='installation']"> 594 <xsl:call-template name="output-root"> 595 <xsl:with-param name="out-string" 596 select="substring-before($out-string,string($APOS))"/> 597 </xsl:call-template> 598 <xsl:text>'\''</xsl:text> 599 <xsl:call-template name="output-root"> 600 <xsl:with-param name="out-string" 601 select="substring-after($out-string,string($APOS))"/> 602 </xsl:call-template> 603 </xsl:when> 564 604 <xsl:otherwise> 565 605 <xsl:value-of select="$out-string"/>
Note:
See TracChangeset
for help on using the changeset viewer.