#!/bin/sh
if test ! -r config.cflags
then
echo "$0: no ./config.cflags file"
exit 1
fi
if test ! -r TestDB
then
echo "$0: no ./TestDB file"
exit 1
fi
new=""
for i in `LC_ALL=C sort < config.cflags`
do
w=`echo $i | sed 's/^-D//'`
if test "X$new" = "X"
then
new=$w
else
new="$new $w"
fi
done
grep "^$new\$" TestDB > /dev/null 2>&1
if test $? -eq 0
then
exit 0
fi
tty -s > /dev/null 2>&1
if test $? -ne 0
then
echo ""
echo "This suite has not been validated on:"
echo ""
echo " $new"
echo ""
exit 1
fi
ISIG=":"
trap '$ISIG; exit 1' 1 2 3 15
stty -a 2>&1 | grep isig > /dev/null
if test $? -eq 0
then
stty -a 2>&1 | egrep -e -isig > /dev/null
if test $? -eq 0
then
ISIG="stty -isig"
stty isig
fi
fi
j=`echo -n ""`
if test "X$j" = "X-n "
then
EC="\c"
EO=""
else
EC=""
EO="-n"
fi
cat << .CAT_MARK > /dev/tty
==================================================================
!!!WARNING!!!
This dialect or its particular version may not have been validated
with the lsof test suite. Consequently some tests may fail or may
not even compile.
This is the computed identity of this dialect, not found in the
test data base file, ./TestDB:
.CAT_MARK
echo " $new" > /dev/tty
END=0
while test $END = 0
do
echo "" > /dev/tty
echo $EO "Do you want to continue (y|n) [n]? $EC" > /dev/tty
read ANS EXCESS
if test "X$ANS" = "Xn" -o "X$ANS" = "XN"
then
exit 1
fi
if test "X$ANS" = "Xy" -o "X$ANS" = "XY"
then
exit 0
else
echo "Please answer y or n." > /dev/tty
fi
done
echo "$0: unexpected failure!"
exit 2