#! /bin/sh
# Test all tables with lou_checktable.
#
# Copyright (C) 2009 ViewPlus Technologies, Inc. www.viewplus.com 
# and JJB Software, Inc. www.jjb-software.com
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

fail=0

TABLES=`ls $LOUIS_TABLEPATH/*.[cu]tb $LOUIS_TABLEPATH/*.cti $LOUIS_TABLEPATH/*.dis | grep -v countries.cti | grep -v compress.ctb | grep -v corrections.ctb`

for table in $TABLES; do
    if ! lou_checktable $table 2> /dev/null; then
	echo "lou_checktable on $table failed";
	fail=1;
    fi
done

exit $fail
