From 9ae9ca833ac8030797696d1856cc7fbfbd5c3162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Fran=C3=A7ois?= Date: Sat, 20 Sep 2014 16:14:33 +0200 Subject: [PATCH] Add cleanup script --- tests/cleanup.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 tests/cleanup.sh diff --git a/tests/cleanup.sh b/tests/cleanup.sh new file mode 100755 index 00000000..26b1b27a --- /dev/null +++ b/tests/cleanup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +for t in * +do + if [ ! -d $t/data ]; then continue; fi + for i in passwd group shadow gshadow + do + if [ -f $t/data/$i ] + then + if cmp -s $t/config/etc/$i $t/data/$i + then + echo "# $t/data/$i identical to config" + svn rm "$t/data/$i" + fi + fi + done +done + +for t in * +do + cd $t + if [ ! -d data ]; then cd ..; continue; fi + for i in data/* + do + if [ ! -f $i ]; then continue; fi + if ! grep -q $i *.test + then + echo "# $t/$i not used" + svn rm "$i" + fi + done + cd .. +done