Change the code for downloading patches in scripts.xsl
Correct the ftp server usage whan downloading non package files
This commit is contained in:
parent
9d0e0eb568
commit
b9c5dc9d7b
1 changed files with 15 additions and 3 deletions
|
@ -220,8 +220,6 @@ mv ../${sect_ver}.md5.orig ../${sect_ver}.md5
</xsl:text>
|
||||||
<xsl:when test="contains($sub-url,'?')">
|
<xsl:when test="contains($sub-url,'?')">
|
||||||
<xsl:value-of select="substring-before($sub-url,'?')"/>
|
<xsl:value-of select="substring-before($sub-url,'?')"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Should never happen
|
|
||||||
<xsl:when test="contains($sub-url,'.patch')"/> -->
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$sub-url"/>
|
<xsl:value-of select="$sub-url"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
@ -321,9 +319,23 @@ mv ../${sect_ver}.md5.orig ../${sect_ver}.md5
</xsl:text>
|
||||||
<xsl:template match="para" mode="additional">
|
<xsl:template match="para" mode="additional">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains(string(ulink/@url),'.patch')">
|
<xsl:when test="contains(string(ulink/@url),'.patch')">
|
||||||
|
<xsl:variable name="patch">
|
||||||
|
<xsl:call-template name="package_name">
|
||||||
|
<xsl:with-param name="url" select="ulink/@url"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:text>PATCH=</xsl:text>
|
||||||
|
<xsl:value-of select="$patch"/>
|
||||||
|
<xsl:text>
if [[ ! -f $PATCH ]] ; then
</xsl:text>
|
||||||
|
<!-- SRC_ARCHIVE may have subdirectories or not -->
|
||||||
|
<xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$PATCH ]] ; then
</xsl:text>
|
||||||
|
<xsl:text> cp $SRC_ARCHIVE/$PKG_DIR/$PATCH $PATCH
</xsl:text>
|
||||||
|
<xsl:text> elif [[ -f $SRC_ARCHIVE/$PATCH ]] ; then
</xsl:text>
|
||||||
|
<xsl:text> cp $SRC_ARCHIVE/$PATCH $PATCH
 else
</xsl:text>
|
||||||
<xsl:text>wget -T 30 -t 5 </xsl:text>
|
<xsl:text>wget -T 30 -t 5 </xsl:text>
|
||||||
<xsl:value-of select="ulink/@url"/>
|
<xsl:value-of select="ulink/@url"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
|
<xsl:text>
 fi
fi
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="ulink">
|
<xsl:when test="ulink">
|
||||||
<xsl:if test="string-length(ulink/@url) > '10'">
|
<xsl:if test="string-length(ulink/@url) > '10'">
|
||||||
|
@ -346,7 +358,7 @@ mv ../${sect_ver}.md5.orig ../${sect_ver}.md5
</xsl:text>
|
||||||
<xsl:text> elif [[ -f $SRC_ARCHIVE/$PACKAGE1 ]] ; then
</xsl:text>
|
<xsl:text> elif [[ -f $SRC_ARCHIVE/$PACKAGE1 ]] ; then
</xsl:text>
|
||||||
<xsl:text> cp $SRC_ARCHIVE/$PACKAGE1 $PACKAGE1
 else
</xsl:text>
|
<xsl:text> cp $SRC_ARCHIVE/$PACKAGE1 $PACKAGE1
 else
</xsl:text>
|
||||||
<!-- The FTP_SERVER mirror -->
|
<!-- The FTP_SERVER mirror -->
|
||||||
<xsl:text> wget -T 30 -t 5 ${FTP_SERVER}blfs/svn/</xsl:text>
|
<xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
|
||||||
<xsl:value-of select="$first_letter"/>
|
<xsl:value-of select="$first_letter"/>
|
||||||
<xsl:text>/$PACKAGE1</xsl:text>
|
<xsl:text>/$PACKAGE1</xsl:text>
|
||||||
<xsl:text> || \
 wget -T 30 -t 5 </xsl:text>
|
<xsl:text> || \
 wget -T 30 -t 5 </xsl:text>
|
||||||
|
|
Reference in a new issue