From 2f916c6293e958941f206679fb2fa1a18fa6aa9d Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 20 Jul 2006 10:28:27 +0000 Subject: [PATCH] script for finding identical reference files git-svn-id: https://svn.dealii.org/trunk@13398 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/scripts/find_identical.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/scripts/find_identical.sh diff --git a/tests/scripts/find_identical.sh b/tests/scripts/find_identical.sh new file mode 100644 index 0000000000..998f068f93 --- /dev/null +++ b/tests/scripts/find_identical.sh @@ -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 -- 2.39.5