- Timestamp:
- 03/01/2017 03:54:16 PM (8 years ago)
- Branches:
- 2.4, ablfs-more, legacy, trunk
- Children:
- 84440e6
- Parents:
- fbdd1a8
- Location:
- BLFS/xsl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/make_book.xsl
rfbdd1a8 r70d73d1 8 8 <xsl:param name="list" select="''"/> 9 9 <xsl:param name="MTA" select="'sendmail'"/> 10 11 <!-- Check whether the book is sysv or systemd --> 12 <xsl:variable name="rev"> 13 <xsl:choose> 14 <xsl:when test="//bookinfo/title/phrase[@revision='systemd']"> 15 <xsl:text>systemd</xsl:text> 16 </xsl:when> 17 <xsl:otherwise> 18 <xsl:text>sysv</xsl:text> 19 </xsl:otherwise> 20 </xsl:choose> 21 </xsl:variable> 10 22 11 23 <xsl:output … … 20 32 <?dbhtml filename="preface.html"?> 21 33 <title>Preface</title> 22 <xsl:copy-of select="id('bootscripts')"/> 34 <xsl:choose> 35 <xsl:when test="$rev='sysv'"> 36 <xsl:copy-of select="id('bootscripts')"/> 37 </xsl:when> 38 <xsl:otherwise> 39 <xsl:copy-of select="id('systemd-units')"/> 40 </xsl:otherwise> 41 </xsl:choose> 23 42 </preface> 24 43 <chapter> … … 113 132 <xsl:otherwise> 114 133 <xsl:choose> 115 <xsl:when test="@linkend='bootscripts'"> 134 <xsl:when test="@linkend='bootscripts' or 135 @linkend='systemd-units'"> 116 136 <xsl:copy-of select="."/> 117 137 </xsl:when> -
BLFS/xsl/scripts.xsl
rfbdd1a8 r70d73d1 10 10 <!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. --> 11 11 12 <!-- Check whether the book is sysv or systemd --> 13 <xsl:variable name="rev"> 14 <xsl:choose> 15 <xsl:when test="//bookinfo/title/phrase[@revision='systemd']"> 16 systemd 17 </xsl:when> 18 <xsl:otherwise> 19 sysv 20 </xsl:otherwise> 21 </xsl:choose> 22 </xsl:variable> 23 12 24 <!-- Build as user (y) or as root (n)? --> 13 25 <xsl:param name="sudo" select="'y'"/> … … 21 33 <xsl:template match="sect1"> 22 34 23 <xsl:if test="@id != 'bootscripts' ">35 <xsl:if test="@id != 'bootscripts' and @id != 'systemd-units'"> 24 36 <!-- The file names --> 25 37 <xsl:variable name="filename" select="@id"/> … … 403 415 </xsl:template> 404 416 405 <xsl:template match="screen" mode="config"> 406 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 407 <xsl:text>[[ ! -d $SRC_DIR/blfs-bootscripts ]] && mkdir $SRC_DIR/blfs-bootscripts 408 pushd $SRC_DIR/blfs-bootscripts 417 <xsl:template name="set-bootpkg-dir"> 418 <xsl:param name="bootpkg" select="'bootscripts'"/> 419 <xsl:param name="url" select="''"/> 420 <xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text> 421 <xsl:copy-of select="$bootpkg"/> 422 <xsl:text> ]] && mkdir $SRC_DIR/blfs-</xsl:text> 423 <xsl:copy-of select="$bootpkg"/> 424 <xsl:text> 425 pushd $SRC_DIR/blfs-</xsl:text> 426 <xsl:copy-of select="$bootpkg"/> 427 <xsl:text> 409 428 URL=</xsl:text> 410 <xsl:value-of select="id('bootscripts')//itemizedlist//ulink/@url"/><xsl:text> 429 <xsl:value-of select="$url"/> 430 <xsl:text> 411 431 BOOTPACKG=$(basename $URL) 412 432 if [[ ! -f $BOOTPACKG ]] ; then … … 435 455 cd $BOOTUNPACKDIR 436 456 </xsl:text> 457 </xsl:template> 458 459 <xsl:template match="screen" mode="config"> 460 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 461 <xsl:call-template name="set-bootpkg-dir"> 462 <xsl:with-param name="bootpkg" select="'bootscripts'"/> 463 <xsl:with-param name="url" 464 select="id('bootscripts')//itemizedlist//ulink/@url"/> 465 </xsl:call-template> 466 </xsl:if> 467 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']"> 468 <xsl:call-template name="set-bootpkg-dir"> 469 <xsl:with-param name="bootpkg" select="'systemd-units'"/> 470 <xsl:with-param name="url" 471 select="id('systemd-units')//itemizedlist//ulink/@url"/> 472 </xsl:call-template> 437 473 </xsl:if> 438 474 <xsl:apply-templates select='.'/> 439 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 475 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or 476 @linkend='systemd-units']"> 440 477 <xsl:text> 441 478 popd</xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.