summaryrefslogtreecommitdiffstats
path: root/tests/cleanup.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:22:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:22:06 +0000
commit741c1ef7a4f2ac316ad6e557ddbe03023413478d (patch)
tree38890f681daa26c57e865b4feca10d0ca53e1046 /tests/cleanup.sh
parentInitial commit. (diff)
downloadshadow-upstream.tar.xz
shadow-upstream.zip
Adding upstream version 1:4.5.upstream/1%4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtests/cleanup.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/cleanup.sh b/tests/cleanup.sh
new file mode 100755
index 0000000..26b1b27
--- /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