Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> if [ `cd "$srcdir" ; /bin/pwd` = `/bin/pwd` ] ; then : ; else
> That doesn't work in some setups; that's why we have what we have now.
> The problem is that this test would actually evaluate to "not equal" and
> the prep_buildtree would run on top of the source tree. Ugh.
Hmm. Well, there's always the direct-experiment approach to finding out
whether two directories are the same. How about some variant of
touch ./funkyFileName
if [ -f "$srcdir/funkyFileName" ]
-- $srcdir is .
else
-- $srcdir is not .
fi
rm ./funkyFileName
regards, tom lane