#!/bin/sh - # # $Id: chk.err 7 2007-02-03 13:34:17Z gburd $ # # Check to make sure all of the error values have corresponding error # message strings in db_strerror(). # Top-level directory. d=../.. # Path names are from a top-level directory. [ -f $d/README ] || { echo 'FAIL: cannot find source distribution directory.' exit 1 } t1=__1 t2=__2 egrep -- "define.*DBSQL_.*-509" $d/src/dbsql.in | awk '{print $2}' > $t1 sed -e '/^dbsql_strerror/,/^}/{' \ -e '/ case DBSQL_/{' \ -e 's/:.*//' \ -e 's/.* //' \ -e p \ -e '}' \ -e '}' \ -e d \ < $d/src/common/dbsql_err.c > $t2 cmp $t1 $t2 > /dev/null || (echo "<<< db.h >>> db_strerror" && diff $t1 $t2 && exit 1) exit 0