[Lunar-commits] r19123 - lunar/trunk/bin

Auke Kok sofar at lunar-linux.org
Sun Mar 5 06:59:01 UTC 2006


Author: sofar
Date: 2006-03-05 06:58:54 +0000 (Sun, 05 Mar 2006)
New Revision: 19123

Modified:
   lunar/trunk/bin/lvu
Log:
Add a compile time calculator to 'lvu info' - it will use TimeDate - and display that this perl module is missing.


Modified: lunar/trunk/bin/lvu
===================================================================
--- lunar/trunk/bin/lvu	2006-03-05 05:50:33 UTC (rev 19122)
+++ lunar/trunk/bin/lvu	2006-03-05 06:58:54 UTC (rev 19123)
@@ -700,15 +700,24 @@
     echo ""
     echo "Installation Info"
     if module_installed $1 ; then
-      echo -n "  Installed Version: $(installed_version $1)"
+      IVERSION=$(installed_version $1)
+      echo -n "  Installed Version: $IVERSION"
       if module_is_expired $1 ; then
-        echo "  (updated module available!)"
+        echo "  (updated module available: $VERSION!)"
       else
         echo ""
       fi
-      echo "  Approx. Size:      $(main size $1)"
+      echo -n "  Last compile time: "
+      if module_installed "TimeDate" ; then
+        CTIME=$(main compile $1 | grep 'Mark Compile ' | cut -d \" -f6 | perl -e 'use Date::Parse; my $start = <> ; my $stop = <> ; print str2time($stop) - str2time($start) . "\n";')
+        echo "$((CTIME / 60))m$((CTIME % 60))s"
+      else
+        echo "(unable to calculate without \"TimeDate\" installed)"
+      fi
+      echo -n "  Approx. Size:      "
+      main size $1
       echo -n "  Files Installed:   "
-      echo "`echo "$(main install $1)" | wc -l`"
+      main install $1 | wc -l
     else
       echo "  Module not installed."
     fi



More information about the Lunar-commits mailing list