(unnamed)

text/plain

Filename: (unnamed)
Type: text/plain
Part: 0
Message: Re: security label support, revised
#!/bin/bash

. traprm

[ "$1" = "-q" ] && QUIET="Y"

if [ ! -f COPYRIGHT ]
then	cd /pgtop || exit 1
fi

chown -R postgres .

# skip for <= PG 8.1, SGML has tabs
if ! grep 'AC_INIT(\[PostgreSQL\]' configure.in | egrep -q '\[(6\.|7\.|8\.[01])'
then
	echo "Checking SGML"
	cd doc/src/sgml
	gmake check > $TMP/0 2>&1  
	if grep -q 'Error' < $TMP/0
	then	echo "SGML error"
		cat $TMP/0
		exit 1
	fi

	gmake check-tabs

	# Run only at night to check for HISTORY build problems
	# in HISTORY.html.
	if [ ! -t 0 ]
	then	gmake HISTORY.html > $TMP/0 2>&1
		if grep -q 'Error' < $TMP/0
		then	echo "SGML error"
			cat $TMP/0
			exit 1
		fi
	fi
	
	# fails on /bin/sh
	cd -
fi

echo "Checking duplicate oids"
cd src/include/catalog
duplicate_oids > $TMP/0
if [ -s $TMP/0 ]
then	echo "Duplicate system oids"
	cat $TMP/0
	exit 1
fi
cd -

# supress assembler warning
(aspg /pg/tools/pgtest "$@"; echo "$?" > $TMP/ret) |
# use only one grep so we don't buffer output
egrep -v ': Warning: using `%|^SPI.c:.*: warning: |^ppport.h:[0-9][0-9]*: warning: |^/usr/libdata/perl5/5.00503/i386-bsdos/CORE/patchlevel.h|plperl.c:.*: warning: (implicit|passing)|variable .fast. might be clobbered|warning: unused variable .yyg.'

rm -fr src/test/regress/tmp_check

[ ! "$QUIET" ] && bell

exit `cat $TMP/ret`