Author: bdubbs
Date: Sun Jan  6 18:36:29 2019
New Revision: 20929

Log:
Tweak exiv2 script

Modified:
   trunk/scripts/blfs-chapter10.php

Modified: trunk/scripts/blfs-chapter10.php
==============================================================================
--- trunk/scripts/blfs-chapter10.php    Sun Jan  6 18:09:50 2019        (r20928)
+++ trunk/scripts/blfs-chapter10.php    Sun Jan  6 18:36:29 2019        (r20929)
@@ -15,6 +15,7 @@
 $ignores[ 'ippicv' ] = "";
 
 //$current="opencv_contrib";   // For debugging
+$current="exiv2";   // For debugging
 
 $regex = array();
 $regex[ 'LibRaw'        ] = "/^.*LibRaw-(\d[\d\.]+\d).tar.*$/";
@@ -270,7 +271,18 @@
     return find_max( $lines, "/$book_index/", '/^.*aalib-([rc\d\.]+).tar.*$/' 
);
 
   if ( $book_index == "exiv2" )
-    return find_max( $lines, "/  Version \d/", '/^.*Version (\d\.[\d\.]+)$/' );
+  {
+    $max = find_max( $lines, "/  Version \d/", '/^.*Version (\d\.[\d\.]+)$/' );
+
+    for ( $i = 0; $i < strlen($max); $i++ )
+    {
+      if ( $max[$i] == '.' ) $dots++;
+    }
+
+    if ( $dots < 2 ) $max .= '.0';
+
+    return $max;
+  }
 
   // imlib
   if ( $book_index == "imlib2" )
-- 
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