]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
script for finding identical reference files
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 20 Jul 2006 10:28:27 +0000 (10:28 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 20 Jul 2006 10:28:27 +0000 (10:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@13398 0785d39b-7218-0410-832d-ea1e28bc413d

tests/scripts/find_identical.sh [new file with mode: 0644]

diff --git a/tests/scripts/find_identical.sh b/tests/scripts/find_identical.sh
new file mode 100644 (file)
index 0000000..998f068
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+######################################################################
+# Find equal reference files
+#
+# Called from one of the top level test directories, finds all doubled
+# reference files in */cmp and outputs them for possible removal.
+#
+######################################################################
+
+# go through all files
+for dir in *; do
+  # if file is a directory,
+  if ! test -d $dir; then continue; fi
+  # change to the subdirectory with reference files
+  cd $dir/cmp
+
+  # now diff all possible combinations and
+  # write a line if files are equal.
+  for file in *; do
+    for cmp in *; do
+      if test "$file" = "$cmp"; then break; fi
+      if diff -q $file $cmp &> /dev/null ; then
+        echo "$dir $file $cmp equal"
+      fi
+    done
+   done
+   cd ../..
+ done

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.