More package dir name fixes.

Fixed when "Download HTTP" or "Download FTP" URLs are empty.
This commit is contained in:
Manuel Canales Esparcia 2006-06-17 14:53:59 +00:00
parent 8aba69a082
commit a4ccd54ecb

View file

@ -26,12 +26,24 @@
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/> <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
<xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/> <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
<!-- Package name (what happens if "Download HTTP" is empty?)--> <!-- Package name (use "Download FTP" by default. If empty, use "Download HTTP" -->
<xsl:param name="package"> <xsl:param name="package">
<xsl:choose>
<xsl:when
test="string-length(sect2[@role='package']/itemizedlist/listitem[2]/para/ulink/@url)
&gt; '10'">
<xsl:call-template name="package_name"> <xsl:call-template name="package_name">
<xsl:with-param name="url" <xsl:with-param name="url"
select="sect2[@role='package']/itemizedlist/listitem/para/ulink/@url"/> select="sect2[@role='package']/itemizedlist/listitem[2]/para/ulink/@url"/>
</xsl:call-template> </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="package_name">
<xsl:with-param name="url"
select="sect2[@role='package']/itemizedlist/listitem[1]/para/ulink/@url"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:param> </xsl:param>
<!-- FTP dir name --> <!-- FTP dir name -->
@ -199,10 +211,18 @@
<!-- pine --> <!-- pine -->
<xsl:when test="contains($package, 'pine')"> <xsl:when test="contains($package, 'pine')">
<xsl:text>pine</xsl:text> <xsl:text>pine</xsl:text>
</xsl:when>
<!-- portmap -->
<xsl:when test="contains($package, 'portmap')">
<xsl:text>portmap</xsl:text>
</xsl:when> </xsl:when>
<!-- psutils --> <!-- psutils -->
<xsl:when test="contains($package, 'psutils')"> <xsl:when test="contains($package, 'psutils')">
<xsl:text>psutils</xsl:text> <xsl:text>psutils</xsl:text>
</xsl:when>
<!-- qpopper -->
<xsl:when test="contains($package, 'qpopper')">
<xsl:text>qpopper</xsl:text>
</xsl:when> </xsl:when>
<!-- QT --> <!-- QT -->
<xsl:when test="contains($package, 'qt-x')"> <xsl:when test="contains($package, 'qt-x')">
@ -285,15 +305,20 @@
<!-- The FTP_SERVER mirror --> <!-- The FTP_SERVER mirror -->
<xsl:text> wget $FTP_SERVER/BLFS/conglomeration/$PKG_DIR/$PACKAGE || \&#xA;</xsl:text> <xsl:text> wget $FTP_SERVER/BLFS/conglomeration/$PKG_DIR/$PACKAGE || \&#xA;</xsl:text>
<!-- Upstream HTTP URL --> <!-- Upstream HTTP URL -->
<xsl:if test="string-length(ulink/@url) &gt; '10'">
<xsl:text> wget </xsl:text> <xsl:text> wget </xsl:text>
<xsl:value-of select="ulink/@url"/> <xsl:value-of select="ulink/@url"/>
<xsl:text> || \&#xA;</xsl:text> <xsl:text> || \&#xA;</xsl:text>
</xsl:if>
</xsl:when> </xsl:when>
<xsl:when test="contains(string(),'FTP')"> <xsl:when test="contains(string(),'FTP')">
<!-- Upstream FTP URL --> <!-- Upstream FTP URL -->
<xsl:if test="string-length(ulink/@url) &gt; '10'">
<xsl:text> wget </xsl:text> <xsl:text> wget </xsl:text>
<xsl:value-of select="ulink/@url"/> <xsl:value-of select="ulink/@url"/>
<xsl:text>&#xA; fi&#xA;fi&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:text> fi&#xA;fi&#xA;</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="contains(string(),'MD5')"> <xsl:when test="contains(string(),'MD5')">
<xsl:text>echo "</xsl:text> <xsl:text>echo "</xsl:text>