Author: bdubbs
Date: Mon May  9 17:48:31 2016
New Revision: 17343

Log:
Fix for vala

Modified:
   trunk/scripts/blfs-chapter13.php

Modified: trunk/scripts/blfs-chapter13.php
==============================================================================
--- trunk/scripts/blfs-chapter13.php    Mon May  9 17:27:00 2016        (r17342)
+++ trunk/scripts/blfs-chapter13.php    Mon May  9 17:48:31 2016        (r17343)
@@ -37,7 +37,7 @@
 $ignores[ 'python'       ] = '';
 $ignores[ 'python1'      ] = '';
 
-//$current="ruby";  // For debugging
+//$current="vala";  // For debugging
 
 $regex = array();
 $regex[ 'check'   ] = "/^.*Download check-(\d[\d\.]+\d).tar.*$/";
@@ -402,17 +402,6 @@
       $dirpath  = substr ( $dirpath, 0, $position ) . "/latest";
     }
 
-    if ( $book_index == "vala" )
-    {
-       // Get the max directory and adjust the directory path
-      $dirpath  = rtrim  ( $dirpath, "/" );    // Trim any trailing slash
-      $position = strrpos( $dirpath, "/" );
-      $dirpath  = substr ( $dirpath, 0, $position );
-      $lines    = http_get_file( "$dirpath/" );
-      $dir      = find_even_max( $lines, "/\d[\d\.]+/", "/^(\d[\d\.]+).*/" );
-      $dirpath .= "/$dir/";
-    }
-
     if ( $book_index == "cvs" )
     {
        // Get the max directory
@@ -472,6 +461,17 @@
       return $max;
     }
 
+    if ( $book_index == "vala" )
+    {
+       // Get the max directory and adjust the directory path
+      $dirpath  = rtrim  ( $dirpath, "/" );    // Trim any trailing slash
+      $position = strrpos( $dirpath, "/" );
+      $dirpath  = substr ( $dirpath, 0, $position );
+      $lines    = http_get_file( "$dirpath/" );
+      $dir      = find_even_max( $lines, "/\d[\d\.]+/", "/^\s*(\d[\d\.]+).*/" 
);
+      $dirpath .= "/$dir/";
+    }
+
     $strip = "yes";
     $lines = http_get_file( $dirpath, $strip );
     if ( ! is_array( $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