Changeset 7818e780


Ignore:
Timestamp:
01/25/2007 07:55:05 PM (15 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.1, 11.0, 11.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, krejzi/svn, lazarus, nosym, perl-modules, qt5new, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/test-20220226
Children:
60844b8
Parents:
9268fb5
Message:

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r9268fb5 r7818e780  
    4545        done;
    4646
    47 wget-list:
    48         mkdir -p $(BASEDIR)
    49         xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
    5047
    5148nochunks:
     
    110107        rm blfs-patches
    111108
    112 .PHONY : blfs-patch-list
     109wget-list:
     110        mkdir -p $(BASEDIR)
     111        xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list
     112
     113test-links:
     114        mkdir -p $(BASEDIR)
     115        xsltproc --xinclude --nonet --stringparam list_mode full \
     116            stylesheets/wget-list.xsl index.xml > $(BASEDIR)/test-links
     117        for URL in `cat $(BASEDIR)/test-links`; do \
     118            wget --spider --tries=2 --timeout=60 $$URL >>/dev/null 2>&1; \
     119            if test $$? -ne 0 ; then echo $$URL >> $(BASEDIR)/bad_urls ; \
     120            else echo $$URL >> $(BASEDIR)/good_urls 2>&1; \
     121            fi; \
     122        done
     123        for URL2 in `cat $(BASEDIR)/bad_urls`; do \
     124            wget --spider --tries=2 --timeout=60 $$URL2 >>/dev/null 2>&1; \
     125            if test $$? -ne 0 ; then echo $$URL2 >> $(BASEDIR)/true_bad_urls ; \
     126            else echo $$URL2 >> $(BASEDIR)/good_urls 2>&1; \
     127            fi; \
     128        done
     129
     130.PHONY : blfs-patch-list wget-list test-links
  • stylesheets/wget-list.xsl

    r9268fb5 r7818e780  
    1414  <xsl:output method="text"/>
    1515
     16  <!-- Define the generated wget file type:
     17       ftpmirror - the one used to check FTP mirrors (default)
     18       full - the one used to test all download links found in the book
     19  -->
     20  <xsl:param name="list_mode" select="ftpmirror"/>
     21
    1622  <xsl:template match="/">
    17     <xsl:apply-templates select="//itemizedlist"/>
     23    <xsl:choose>
     24      <xsl:when test="$list_mode = 'full'">
     25       <xsl:apply-templates select="//ulink" mode="full"/>
     26      </xsl:when>
     27      <xsl:otherwise>
     28        <xsl:apply-templates select="//itemizedlist"/>
     29      </xsl:otherwise>
     30    </xsl:choose>
    1831  </xsl:template>
    1932
     
    4154
    4255  <xsl:template match="listitem/para/ulink">
    43       <!-- If some package don't have the predefined strings in their
    44       name, the next test must be fixed to match it also. Skip possible
    45       duplicated URLs due that may be splitted for PDF output -->
    46     <xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
    47                   or contains(@url, '.zip') or contains(@url, '.patch')) and
    48                   not(ancestor-or-self::*/@condition = 'pdf')">
     56      <!-- The next strings need be revised periodically to add missing
     57      files or to skip false positives. Skip also possible
     58      duplicated URLs that may be splitted for PDF output -->
     59    <xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
     60                  or contains(@url, '.tgz') or contains(@url, '.tar')
     61                  or contains(@url, 'patch.txt') or contains(@url, '.zip')
     62                  or contains(@url, '.patch') or contains(@url, '/patch.'))
     63                  and not(ancestor-or-self::*/@condition = 'pdf')">
    4964      <xsl:choose>
    5065        <!-- Fix SourceForge links-->
     
    6075  </xsl:template>
    6176
     77  <xsl:template match="ulink" mode="full">
     78      <!-- The next strings need be revised periodically to add missing
     79      files or to skip false positives. Skip also possible
     80      duplicated URLs that may be splitted for PDF output -->
     81    <xsl:if test="(contains(@url, '.gz') or contains(@url, '.bz2')
     82                  or contains(@url, '.tgz') or contains(@url, '.tar')
     83                  or contains(@url, '.txt') or contains(@url, 'compressdoc')
     84                  or contains(@url, '.zip') or contains(@url, '.patch')
     85                  or contains(@url, '/patch.') or contains(@url, 'md5sums')
     86                  or contains(@url, 'mozconfig'))
     87                  and not(contains(@url, '?url'))
     88                  and not(ancestor-or-self::*/@condition = 'pdf')">
     89      <!-- To list all URls, included html files, wiki pages, home pages, and
     90      mailto: links, comment-out the above xsl:if and uncomment the next one. -->
     91    <!--
     92    <xsl:if test="not(ancestor-or-self::*/@condition = 'pdf')">
     93    -->
     94      <xsl:value-of select="@url"/>
     95      <xsl:text>&#x0a;</xsl:text>
     96    </xsl:if>
     97  </xsl:template>
     98
    6299</xsl:stylesheet>
    63 
Note: See TracChangeset for help on using the changeset viewer.