[Lunar-commits] <lunar> lvu info don't use perl
Peter de Ridder
peter at lunar-linux.org
Thu Aug 2 22:47:08 CEST 2012
commit c3c67a82e77325fd362e4ea1dd542c2adff1342e
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Thu, 02 Aug 2012 13:47:08 -0700
URL: https://github.com/lunar-linux/lunar/commit/c3c67a82e77325fd362e4ea1dd542c2adff1342e
lvu info don't use perl
---
prog/lvu +3/-6
1 files changed, 3 insertions (+), 6 deletions (-)
--- a/prog/lvu
+++ b/prog/lvu
@@ -879,12 +879,9 @@ show_info() {
echo ""
fi
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
+ TIMES=($(main compile $1 | grep 'Mark Compile ' | cut -d \" -f6 | while read TIME ; do date +%s -d "$TIME" ; done))
+ CTIME=$((${TIMES[1]} - ${TIMES[0]}))
+ echo "$((CTIME / 60))m$((CTIME % 60))s"
echo -n " Approx. Size: "
main size $1
echo -n " Files Installed: "
More information about the Lunar-commits
mailing list