summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-06-19 18:45:10 +0000
committerKarl Berry <karl@freefriends.org>2007-06-19 18:45:10 +0000
commit6bcd0f70dd30ed9f6deb3e10b26f79ab19d32bb9 (patch)
tree2cf35435e25ca07037a1b5de5729723acc82b27d /Master
parent62907f44ffaddd7ed379123275ac93cc687fb195 (diff)
initial
git-svn-id: svn://tug.org/texlive/trunk@4473 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/bin/tldbcheck32
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/tldbcheck b/Master/tlpkg/bin/tldbcheck
new file mode 100755
index 00000000000..64a6c290b57
--- /dev/null
+++ b/Master/tlpkg/bin/tldbcheck
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $Id$
+# Copyright 2007 Karl Berry
+# This file is licensed under the GNU General Public Licence version 2
+# or any later version.
+#
+# Check that tldb contains all the files in the trees, exactly once.
+
+cd `dirname $0`/../.. || exit 1
+
+if test ! -s texlive.tldb; then
+ echo "$0: no (nonempty) texlive.tldb in $0, goodbye." >&2
+ exit 1
+fi
+
+: ${TMPDIR=/tmp}
+trap "rm -f $TMPDIR/tldb*" 0 1 2 15
+
+# Get list of files.
+tldbfiles=$TMPDIR/tldbfiles.$$
+grep '^ ' texlive.tldb | sort >$tldbfiles
+
+echo "$0: checking duplicates..."
+# GNU uniq makes it simple.
+uniq --repeated $tldbfiles
+
+echo "$0: checking coverage...(long)"
+dirs=bin
+diskfiles=$TMPDIR/tldbdisk.$$
+find $dirs -name .svn -prune -o \( \( -type f -o -type l \) -print \) | sed 's/^/ /' | sort | tee /tmp/x >$diskfiles
+
+comm -3 $tldbfiles $diskfiles