mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 06:17:46 +08:00
Fixed some missing links in wget-list target.
Added test-links target. git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6464 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
9268fb5059
commit
7818e78099
26
Makefile
26
Makefile
@ -44,9 +44,6 @@ blfs:
|
|||||||
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
|
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
wget-list:
|
|
||||||
mkdir -p $(BASEDIR)
|
|
||||||
xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
|
|
||||||
|
|
||||||
nochunks:
|
nochunks:
|
||||||
@echo "Generating nochunks version of BLFS..."
|
@echo "Generating nochunks version of BLFS..."
|
||||||
@ -109,4 +106,25 @@ blfs-patch-list:
|
|||||||
sort blfs-patches > blfs-patch-list
|
sort blfs-patches > blfs-patch-list
|
||||||
rm blfs-patches
|
rm blfs-patches
|
||||||
|
|
||||||
.PHONY : blfs-patch-list
|
wget-list:
|
||||||
|
mkdir -p $(BASEDIR)
|
||||||
|
xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
|
||||||
|
|
||||||
|
test-links:
|
||||||
|
mkdir -p $(BASEDIR)
|
||||||
|
xsltproc --xinclude --nonet --stringparam list_mode full \
|
||||||
|
stylesheets/wget-list.xsl index.xml > $(BASEDIR)/test-links
|
||||||
|
for URL in `cat $(BASEDIR)/test-links`; do \
|
||||||
|
wget --spider --tries=2 --timeout=60 $$URL >>/dev/null 2>&1; \
|
||||||
|
if test $$? -ne 0 ; then echo $$URL >> $(BASEDIR)/bad_urls ; \
|
||||||
|
else echo $$URL >> $(BASEDIR)/good_urls 2>&1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
for URL2 in `cat $(BASEDIR)/bad_urls`; do \
|
||||||
|
wget --spider --tries=2 --timeout=60 $$URL2 >>/dev/null 2>&1; \
|
||||||
|
if test $$? -ne 0 ; then echo $$URL2 >> $(BASEDIR)/true_bad_urls ; \
|
||||||
|
else echo $$URL2 >> $(BASEDIR)/good_urls 2>&1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY : blfs-patch-list wget-list test-links
|
||||||
|
@ -13,8 +13,21 @@ $Date$
|
|||||||
|
|
||||||
<xsl:output method="text"/>
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<!-- Define the generated wget file type:
|
||||||
|
ftpmirror - the one used to check FTP mirrors (default)
|
||||||
|
full - the one used to test all download links found in the book
|
||||||
|
-->
|
||||||
|
<xsl:param name="list_mode" select="ftpmirror"/>
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//itemizedlist"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$list_mode = 'full'">
|
||||||
|
<xsl:apply-templates select="//ulink" mode="full"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates select="//itemizedlist"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="itemizedlist">
|
<xsl:template match="itemizedlist">
|
||||||
@ -40,12 +53,14 @@ $Date$
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="listitem/para/ulink">
|
<xsl:template match="listitem/para/ulink">
|
||||||
<!-- If some package don't have the predefined strings in their
|
<!-- The next strings need be revised periodically to add missing
|
||||||
name, the next test must be fixed to match it also. Skip possible
|
files or to skip false positives. Skip also possible
|
||||||
duplicated URLs due that may be splitted for PDF output -->
|
duplicated URLs that may be splitted for PDF output -->
|
||||||
<xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
|
<xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
|
||||||
or contains(@url, '.zip') or contains(@url, '.patch')) and
|
or contains(@url, '.tgz') or contains(@url, '.tar')
|
||||||
not(ancestor-or-self::*/@condition = 'pdf')">
|
or contains(@url, 'patch.txt') or contains(@url, '.zip')
|
||||||
|
or contains(@url, '.patch') or contains(@url, '/patch.'))
|
||||||
|
and not(ancestor-or-self::*/@condition = 'pdf')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!-- Fix SourceForge links-->
|
<!-- Fix SourceForge links-->
|
||||||
<xsl:when test="contains(@url,'?download')">
|
<xsl:when test="contains(@url,'?download')">
|
||||||
@ -59,5 +74,26 @@ $Date$
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
<xsl:template match="ulink" mode="full">
|
||||||
|
<!-- The next strings need be revised periodically to add missing
|
||||||
|
files or to skip false positives. Skip also possible
|
||||||
|
duplicated URLs that may be splitted for PDF output -->
|
||||||
|
<xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
|
||||||
|
or contains(@url, '.tgz') or contains(@url, '.tar')
|
||||||
|
or contains(@url, '.txt') or contains(@url, 'compressdoc')
|
||||||
|
or contains(@url, '.zip') or contains(@url, '.patch')
|
||||||
|
or contains(@url, '/patch.') or contains(@url, 'md5sums')
|
||||||
|
or contains(@url, 'mozconfig'))
|
||||||
|
and not(contains(@url, '?url'))
|
||||||
|
and not(ancestor-or-self::*/@condition = 'pdf')">
|
||||||
|
<!-- To list all URls, included html files, wiki pages, home pages, and
|
||||||
|
mailto: links, comment-out the above xsl:if and uncomment the next one. -->
|
||||||
|
<!--
|
||||||
|
<xsl:if test="not(ancestor-or-self::*/@condition = 'pdf')">
|
||||||
|
-->
|
||||||
|
<xsl:value-of select="@url"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
Loading…
Reference in New Issue
Block a user