- Timestamp:
- 03/01/2017 04:07:26 PM (8 years ago)
- Branches:
- new_features
- Children:
- 796cd28
- Parents:
- 50a8ed0
- Location:
- BLFS/xsl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/make_book.xsl
r50a8ed0 reb8667a 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
r50a8ed0 reb8667a 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 <!-- Wrap "root" commands inside a wrapper function, allowing 13 25 "porg style" package management --> … … 25 37 <xsl:template match="sect1"> 26 38 27 <xsl:if test="@id != 'bootscripts' ">39 <xsl:if test="@id != 'bootscripts' and @id != 'systemd-units'"> 28 40 <!-- The file names --> 29 41 <xsl:variable name="filename" select="@id"/> … … 428 440 </xsl:template> 429 441 430 <xsl:template match="screen" mode="config"> 431 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 432 <xsl:text>[[ ! -d $SRC_DIR/blfs-bootscripts ]] && mkdir $SRC_DIR/blfs-bootscripts 433 pushd $SRC_DIR/blfs-bootscripts 442 <xsl:template name="set-bootpkg-dir"> 443 <xsl:param name="bootpkg" select="'bootscripts'"/> 444 <xsl:param name="url" select="''"/> 445 <xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text> 446 <xsl:copy-of select="$bootpkg"/> 447 <xsl:text> ]] && mkdir $SRC_DIR/blfs-</xsl:text> 448 <xsl:copy-of select="$bootpkg"/> 449 <xsl:text> 450 pushd $SRC_DIR/blfs-</xsl:text> 451 <xsl:copy-of select="$bootpkg"/> 452 <xsl:text> 434 453 URL=</xsl:text> 435 <xsl:value-of select="id('bootscripts')//itemizedlist//ulink/@url"/><xsl:text> 454 <xsl:value-of select="$url"/> 455 <xsl:text> 436 456 BOOTPACKG=$(basename $URL) 437 457 if [[ ! -f $BOOTPACKG ]] ; then … … 460 480 cd $BOOTUNPACKDIR 461 481 </xsl:text> 482 </xsl:template> 483 484 <xsl:template match="screen" mode="config"> 485 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 486 <xsl:call-template name="set-bootpkg-dir"> 487 <xsl:with-param name="bootpkg" select="'bootscripts'"/> 488 <xsl:with-param name="url" 489 select="id('bootscripts')//itemizedlist//ulink/@url"/> 490 </xsl:call-template> 491 </xsl:if> 492 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']"> 493 <xsl:call-template name="set-bootpkg-dir"> 494 <xsl:with-param name="bootpkg" select="'systemd-units'"/> 495 <xsl:with-param name="url" 496 select="id('systemd-units')//itemizedlist//ulink/@url"/> 497 </xsl:call-template> 462 498 </xsl:if> 463 499 <xsl:apply-templates select='.'/> 464 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']"> 500 <xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or 501 @linkend='systemd-units']"> 465 502 <xsl:text> 466 503 popd</xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.