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

Auke Kok sofar at lunar-linux.org
Mon Mar 5 01:17:28 CET 2007


Author: sofar
Date: 2007-03-05 01:17:28 +0100 (Mon, 05 Mar 2007)
New Revision: 23490

Modified:
   lunar/trunk/bin/lvu
Log:
Make `lvu diff` show a real diff, -p1 format, including a/ and b/ stuff


Modified: lunar/trunk/bin/lvu
===================================================================
--- lunar/trunk/bin/lvu	2007-03-04 20:09:38 UTC (rev 23489)
+++ lunar/trunk/bin/lvu	2007-03-05 00:17:28 UTC (rev 23490)
@@ -743,27 +743,29 @@
 diff_module() {
   if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
     message "can't diff modules without ZLOCAL_OVERRIDES=on"
-	exit 1
+    exit 1
   fi
   if [ -z "$1" ]; then
     message "diff requires a single module name"
-	exit 1
+    exit 1
   fi
   if ! run_details "$1" ; then
       message "diff requires an existing module"
       exit 1
   else
     if echo $SECTION | grep -q '^zlocal' ; then
-	  ZLOCAL_OVERRIDES=off NZSECTION=$(find_section $1)
-	  if echo $NZSECTION | grep -q '^zlocal' ; then
-	    unset SECTION
-	  fi
-	else
-	  message "no local copy of \"$MODULE\" exists"
-	  exit 1
+      ZLOCAL_OVERRIDES=off NZSECTION=$(find_section $1)
+      if echo $NZSECTION | grep -q '^zlocal' ; then
+        unset SECTION
+      fi
+    else
+      message "no local copy of \"$MODULE\" exists"
+      exit 1
     fi
-	ZSECTION=$(echo "$SECTION/" | sed 's/^zlocal\///g;s/\/$//')
-    diff -Nurb $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | grep -v "^diff " | sed "s:$MOONBASE/$NZSECTION/::g;s:$MOONBASE/zlocal/$ZSECTION/::g"
+    ZSECTION=$(echo "$SECTION/" | sed 's/^zlocal\///g;s/\/$//')
+    echo diff a/$NZSECTION/$MODULE b/$NZSECTION/$MODULE
+    diff -Nur $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
+    grep -v ^diff | sed "s:$MOONBASE/$NZSECTION/:a/$NZSECTION/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/$NZSECTION/:g"
   fi
 }
 



More information about the Lunar-commits mailing list