Author: bdubbs
Date: Tue Dec 12 13:51:08 2017
New Revision: 19592

Log:
Fix graphviz currency script

Modified:
   trunk/scripts/blfs-chapter11.php
   trunk/scripts/blfs-include.php

Modified: trunk/scripts/blfs-chapter11.php
==============================================================================
--- trunk/scripts/blfs-chapter11.php    Tue Dec 12 12:55:02 2017        (r19591)
+++ trunk/scripts/blfs-chapter11.php    Tue Dec 12 13:51:08 2017        (r19592)
@@ -70,7 +70,7 @@
 
    array( 'pkg'     => 'graphviz',
           'match'   => '^.*$', 
-          'replace' => "http://graphviz.org/pub/graphviz/stable/SOURCES/"; ),
+          'replace' => 
"http://graphviz.gitlab.io/_pages/Download/Download_source.html"; ),
 );
 
 function get_packages( $package, $dirpath )
@@ -192,6 +192,9 @@
   if ( $book_index == "telepathy-mission-control" )
     return find_max( $lines, "/$package/", 
"/^.*$package-([\d\.]*\d)\.tar.*$/", TRUE );
 
+  if ( $book_index == "graphviz" )
+    return find_max( $lines, "/graphviz-/", 
"/^.*graphviz-(\d+\.\d+\.\d+)\.tar.*$/" );
+
   // Most packages are in the form $package-n.n.n
   // Occasionally there are dashes (e.g. 201-1)
   $max = find_max( $lines, "/$package/", "/^.*$package-([\d\.]*\d)\.tar.*$/" );

Modified: trunk/scripts/blfs-include.php
==============================================================================
--- trunk/scripts/blfs-include.php      Tue Dec 12 12:55:02 2017        (r19591)
+++ trunk/scripts/blfs-include.php      Tue Dec 12 13:51:08 2017        (r19592)
@@ -41,7 +41,7 @@
   foreach ( $lines as $line )
   {
      if ( ! preg_match( $regex_match, $line ) ) continue; 
-     
+
      // Isolate the version and put in an array
      $slice = preg_replace( $regex_replace, "$1", $line );
 
@@ -94,6 +94,12 @@
 
 function http_get_file( $url )
 {
+  if ( preg_match( "/graphviz/", $url ) )
+  {
+     exec( "elinks -dump $url", $lines );
+     return $lines;
+  }
+
   if ( ! preg_match( "/sourceforge/", $url ) ||
          preg_match( "/jfs/", $url         ) ||
          preg_match( "/liba52/", $url      ) ||
@@ -102,9 +108,8 @@
          preg_match( "/tk/", $url          ) ||
          preg_match( "/swig/", $url        ) ||
          preg_match( "/docutils/", $url    ) ||
-         preg_match( "/expect/", $url      ) )
+         preg_match( "/expect/", $url      ) ) 
   {
-//echo "url=$url\n";
      exec( "curl -L -s -m40 -A Firefox/41.0 $url", $dir );
      $s   = implode( "\n", $dir );
      $dir = strip_tags( $s );
@@ -125,7 +130,6 @@
   {
 //echo "url=$url\n";
      exec( "elinks -dump $url", $lines );
-//print_r($lines);
      return $lines;
   }
 }
-- 
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