Changeset a4ccd54


Ignore:
Timestamp:
06/17/2006 02:53:59 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
e52ffe5
Parents:
8aba69a
Message:

More package dir name fixes.
Fixed when "Download HTTP" or "Download FTP" URLs are empty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/libs/scripts.xsl

    r8aba69a ra4ccd54  
    2727      <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
    2828
    29         <!-- Package name (what happens if "Download HTTP" is empty?)-->
     29        <!-- Package name (use "Download FTP" by default. If empty, use "Download HTTP" -->
    3030      <xsl:param name="package">
    31         <xsl:call-template name="package_name">
    32           <xsl:with-param name="url"
    33             select="sect2[@role='package']/itemizedlist/listitem/para/ulink/@url"/>
    34         </xsl:call-template>
     31        <xsl:choose>
     32          <xsl:when
     33            test="string-length(sect2[@role='package']/itemizedlist/listitem[2]/para/ulink/@url)
     34            &gt; '10'">
     35            <xsl:call-template name="package_name">
     36              <xsl:with-param name="url"
     37                select="sect2[@role='package']/itemizedlist/listitem[2]/para/ulink/@url"/>
     38            </xsl:call-template>
     39          </xsl:when>
     40          <xsl:otherwise>
     41            <xsl:call-template name="package_name">
     42              <xsl:with-param name="url"
     43                select="sect2[@role='package']/itemizedlist/listitem[1]/para/ulink/@url"/>
     44            </xsl:call-template>
     45          </xsl:otherwise>
     46        </xsl:choose>
    3547      </xsl:param>
    3648
     
    201213        <xsl:text>pine</xsl:text>
    202214      </xsl:when>
     215        <!-- portmap -->
     216      <xsl:when test="contains($package, 'portmap')">
     217        <xsl:text>portmap</xsl:text>
     218      </xsl:when>
    203219        <!-- psutils -->
    204220      <xsl:when test="contains($package, 'psutils')">
    205221        <xsl:text>psutils</xsl:text>
     222      </xsl:when>
     223        <!-- qpopper -->
     224      <xsl:when test="contains($package, 'qpopper')">
     225        <xsl:text>qpopper</xsl:text>
    206226      </xsl:when>
    207227        <!-- QT -->
     
    286306        <xsl:text>    wget $FTP_SERVER/BLFS/conglomeration/$PKG_DIR/$PACKAGE || \&#xA;</xsl:text>
    287307        <!-- Upstream HTTP URL -->
    288         <xsl:text>    wget </xsl:text>
    289         <xsl:value-of select="ulink/@url"/>
    290         <xsl:text> || \&#xA;</xsl:text>
     308        <xsl:if test="string-length(ulink/@url) &gt; '10'">
     309          <xsl:text>    wget </xsl:text>
     310          <xsl:value-of select="ulink/@url"/>
     311          <xsl:text> || \&#xA;</xsl:text>
     312        </xsl:if>
    291313      </xsl:when>
    292314      <xsl:when test="contains(string(),'FTP')">
    293315        <!-- Upstream FTP URL -->
    294         <xsl:text>    wget </xsl:text>
    295         <xsl:value-of select="ulink/@url"/>
    296         <xsl:text>&#xA;  fi&#xA;fi&#xA;</xsl:text>
     316        <xsl:if test="string-length(ulink/@url) &gt; '10'">
     317          <xsl:text>    wget </xsl:text>
     318          <xsl:value-of select="ulink/@url"/>
     319          <xsl:text>&#xA;</xsl:text>
     320        </xsl:if>
     321        <xsl:text>  fi&#xA;fi&#xA;</xsl:text>
    297322      </xsl:when>
    298323      <xsl:when test="contains(string(),'MD5')">
Note: See TracChangeset for help on using the changeset viewer.