diff options
Diffstat (limited to 'misc/relchk.sh.in')
-rwxr-xr-x | misc/relchk.sh.in | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/misc/relchk.sh.in b/misc/relchk.sh.in new file mode 100755 index 000000000..b20a39daf --- /dev/null +++ b/misc/relchk.sh.in @@ -0,0 +1,58 @@ +#!/bin/sh +## +## A simple compare directory content utility. +## +topdir="`pwd`" +distdir="@TAR_NAME@" +log="$topdir/dist-log" +logerror="$topdir/dist-errors" + +getdir() { + for file in `ls`; do + + if test -d $file -a $file != "CVS" -a $file != $distdir; then + (cd $file && getdir) || (cd ..) + else + if test ! -d $file -a \ + $file != $log -a \ + $file != $logerror -a \ + $file != "CVS" -a \ + $file != ${0##*/} -a \ + $file != "$distdir.tar.gz"; then + + orifile=`pwd`/$file + + distfile=$topdir/$distdir${orifile##*$topdir} + + echo -e "check:\t$orifile\nand\t$distfile" >> $log + + if test ! -e $distfile; then + missingfile=${orifile##$topdir} + echo "${missingfile#/} is missing in tarball" >> $logerror + fi + + fi + fi + + done +} + +main() { + rm -f $log $logerror + + ./cvscompile.sh $CONFIG_ARGS && make dist && mv $distdir.tar.gz $distdir.tmp.tar.gz + make clean && make distclean && mv $distdir.tmp.tar.gz $distdir.tar.gz + tar -xzf $distdir.tar.gz + + echo "Check is running, be patient..." + getdir + + rm -rf $distdir + rm -f $distdir.tar.gz + + echo " * Log is ${log##*/}" + echo " * Error log is ${logerror##*/}" + +} + +main |