Author: bdubbs
Date: Thu Apr  9 10:12:57 2020
New Revision: 22979

Log:
Convert bind and dhcp currency to http pages

Modified:
   trunk/scripts/blfs-chapter14.php
   trunk/scripts/blfs-chapter20.php

Modified: trunk/scripts/blfs-chapter14.php
==============================================================================
--- trunk/scripts/blfs-chapter14.php    Thu Apr  9 10:04:59 2020        (r22978)
+++ trunk/scripts/blfs-chapter14.php    Thu Apr  9 10:12:57 2020        (r22979)
@@ -40,6 +40,14 @@
           'match'   => '^.*$', 
           'replace' => "http://roy.marples.name/downloads/dhcpcd"; ),
 
+   array( 'pkg'     => 'bind',
+          'match'   => '^.*$', 
+          'replace' => "https://downloads.isc.org/isc/bind9"; ),
+
+   array( 'pkg'     => 'dhcp',
+          'match'   => '^.*$', 
+          'replace' => "https://downloads.isc.org/isc/dhcp"; ),
+
    array( 'pkg'     => 'nfs-utils',
           'match'   => '^.*$', 
           'replace' => "http://sourceforge.net/projects/nfs/files"; ),
@@ -117,6 +125,7 @@
   // Check for ftp
   if ( preg_match( "/^ftp/", $dirpath ) ) 
   { 
+/*
     if ( $book_index == "bind" )
     {
        // Get the max directory and adjust the directory path
@@ -129,7 +138,8 @@
       $lines2   = http_get_file( $dirpath );
       return find_max( $lines2, "/bind-9/", "/^.*bind-(\d+[\d\.P\-]+).tar.*$/" 
);
     }
-
+*/
+/*
     if ( $book_index == "dhcp"  )
     {
        // Get the max directory and adjust the directory path
@@ -140,7 +150,7 @@
       $dir      = find_max( $lines, "/\d$/", "/^.* (\d\.[\d\.P\-]+)$/" );
       $dirpath .= "/$dir/";
     }
-
+*/
     // Get listing
     $lines    = http_get_file( "$dirpath/" );
   }
@@ -178,7 +188,11 @@
   }
 
   if ( $book_index == "dhcp" )
-    return find_max( $lines, '/dhcp/', '/^.*dhcp-([\d\.P-]+).tar.*$/' );
+    //return find_max( $lines, '/dhcp/', '/^.*dhcp-([\d\.P-]+).tar.*$/' );
+    return find_even_max( $lines, '/^ *\d\./', '/^.* ([\d\.P-]+)\/\d.*$/' );
+
+  if ( $book_index == "bind" )
+    return find_even_max( $lines, '/^ *\d\./', '/^.* ([\d\.P-]+)\/\d.*$/' );
 
   if ( $book_index == "ncftp" )
     return find_max( $lines, '/ncftp/', '/^.*ncftp-([\d\.]+)-src.tar.*$/' );

Modified: trunk/scripts/blfs-chapter20.php
==============================================================================
--- trunk/scripts/blfs-chapter20.php    Thu Apr  9 10:04:59 2020        (r22978)
+++ trunk/scripts/blfs-chapter20.php    Thu Apr  9 10:12:57 2020        (r22979)
@@ -34,6 +34,10 @@
           'match'   => '^.*$', 
           'replace' => "http://packages.debian.org/sid/xinetd"; ),
 
+   array( 'pkg'     => 'bind',
+          'match'   => '^.*$', 
+          'replace' => "https://downloads.isc.org/isc/bind9"; ),
+
    array( 'pkg'     => 'soprano',
           'match'   => '^.*$', 
           'replace' => "http://sourceforge.net/projects/soprano/files"; ),
@@ -119,6 +123,7 @@
   // Check for ftp
   if ( preg_match( "/^ftp/", $dirpath ) ) 
   { 
+/*
     // bind
     if ( $book_index == "bind" )
     {
@@ -133,7 +138,7 @@
 
       return find_max( $lines2, "/bind-9/", "/^.*bind-(\d+[\d\.P-]+).tar.*$/" 
);
     }
-
+*/
     // Get listing
     $lines = http_get_file( "$dirpath/" );
   }
@@ -177,6 +182,9 @@
   if ( $book_index == "qpopper" )
     return find_max( $lines, '/qpopper[\d\.]+.tar.*$/', '/^.* 
qpopper([\d\.]+).tar.*$/' );
 
+  if ( $book_index == "bind" )
+    return find_even_max( $lines, '/^ *\d\./', '/^.* ([\d\.P-]+)\/.*$/' );
+
   if ( $book_index == "sendmail." )
     return find_max( $lines, '/sendmail\.[\d\.]+.tar.*$/', '/^.* 
sendmail\.([\d\.]+).tar.*$/' );
 
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to