mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
71ede9a8f8
* scripts/cpp: Test the exit status from 'type', not 'awk'.
23 lines
421 B
Bash
Executable File
23 lines
421 B
Bash
Executable File
#! /bin/sh
|
|
cpp=`which cpp 2>/dev/null`
|
|
if test $? -ne 0; then
|
|
if type cpp 2>/dev/null >/dev/null; then
|
|
cpp=`type cpp 2>/dev/null | awk '{ print $NF }'`
|
|
else
|
|
cpp=`gcc -print-file-name=cpp 2>/dev/null`
|
|
if test $? -ne 0; then
|
|
if test -x /lib/cpp; then
|
|
cpp=/lib/cpp
|
|
else
|
|
echo "cpp not found" 1>&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
exec $cpp $*
|
|
Local Variables:
|
|
mode: sh
|
|
End:
|