[Lunar-commits] CVS: theedge/var/lib/lunar/functions modules.lunar, 1.50, 1.51

Auke Kok sofar at lunar-linux.org
Tue Nov 16 15:02:11 UTC 2004


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions

Modified Files:
	modules.lunar 
Log Message:
A little bit faster, still the awk call is slow I wish there was something faster than that


Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/modules.lunar,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- modules.lunar	10 Nov 2004 08:18:47 -0000	1.50
+++ modules.lunar	16 Nov 2004 15:02:09 -0000	1.51
@@ -468,11 +468,8 @@
     if [ -z "$MODULE" ] ; then
       MODULE=$1
     fi
-    LINE=$(grep "^$MODULE:" $MODULE_STATUS | grep -v "^moonbase")
-    MODULE=$(echo "$LINE" | cut -d: -f1)
-    IDATE=$(echo "$LINE" | cut -d: -f2)
-    STATUS=$(echo "$LINE" | cut -d: -f3)
-    IVERSION=$(echo "$LINE" | cut -d: -f4)
+    LINE=$(grep "^$MODULE:" $MODULE_STATUS | grep -v "^moonbase" | awk -F: '{print "IDATE="$2" STATUS="$3" IVERSION="$4}')
+    eval $LINE
     if run_details $MODULE &> /dev/null ; then
       if [ "$STATUS" == "installed" ] ; then
         if [ "$VERSION" != "$IVERSION" ] || [ -z "$IDATE" ] ||



More information about the Lunar-commits mailing list