]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add an option for side-by-side diffs and do not remove OK-file
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Sep 2007 20:57:21 +0000 (20:57 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Sep 2007 20:57:21 +0000 (20:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@15104 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/diffsearch

index 991f6b99dc1d261d2380ac7e83f3220177b56a89..12b611afb316907cc2cc7af7d721120d44131501 100755 (executable)
 #
 # options may be
 #   -v for verbose output of diff
+#   -y for side-by-side diff
 
 diffout="/dev/null"
 diffopt=""
 result=""
+okname=""
 
 for arg in $* ; do
-  if test "x$arg" = "x-v" ; then
-    diffout="/dev/stdout" ;
-  fi
+  if test "x$arg" = "x-v" ; then diffout="/dev/stdout" ; fi
+  if test "x$arg" = "x-y" ; then diffopt="-y" ; fi
 done
 
 # First, we check if $1/OK exists. If so, it hopefully contains the
@@ -40,16 +41,22 @@ if test -r $1/OK; then
       touch $1/OK
       echo "$result"
       exit 0 ;
+    else
+      echo " $1/cmp/$okname ";
     fi
   fi
 fi
 
-rm -f $1/OK
+rm -f $1/OK
 
 # If this round failed, check all files in this directory
 # If successful, write the name into $1/OK
 
 for file in `cd $1/cmp ; ls` ; do
+  if test "$diffout" != "/dev/null" ; then
+    echo
+    echo "################### $1/cmp/$file" > $diffout
+  fi
   if test -f $1/cmp/$file ; then
     result="$result $file"
     if diff $diffopt $1/output $1/cmp/$file > $diffout ; then

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.