#!/bin/sh # $Id$ # Copyright 2007 Karl Berry # This file is licensed under the GNU General Public License version 2 # or any later version. # # Check that tlpdb contains all the files in the trees, exactly once. # also that collections don't have files. cd `dirname $0`/../.. || exit 1 tlpdb=tlpkg/texlive.tlpdb if test ! -s $tlpdb; then echo "$0: no (nonempty) $tlpdb in $0, goodbye." >&2 exit 1 fi : ${TMPDIR=/tmp} trap "rm -f $TMPDIR/tlpdb*" 0 1 2 15 # Get list of files. tlpdbfiles=$TMPDIR/tlpdbfiles.$$ grep '^ ' $tlpdb | sort >$tlpdbfiles echo "$0: checking duplicates..." # GNU uniq makes it simple. uniq --repeated $tlpdbfiles echo "$0: checking coverage...(long)" dirs=bin diskfiles=$TMPDIR/tlpdbdisk.$$ find $dirs -name .svn -prune -o \( \( -type f -o -type l \) -print \) | sed 's/^/ /' | sort | tee /tmp/x >$diskfiles comm -3 $tlpdbfiles $diskfiles