mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Use $INDENT rather than indent throughout the pgindent code
This allows the user to change the path to be used more easily. Also, change URL in README.
This commit is contained in:
parent
52b60530f2
commit
c4d124365b
@ -10,7 +10,7 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
|
|||||||
|
|
||||||
2) Download the typedef file from the buildfarm:
|
2) Download the typedef file from the buildfarm:
|
||||||
|
|
||||||
wget -O src/tools/pgindent/typedefs.list http://www.pgbuildfarm.org/cgi-bin/typedefs.pl
|
wget -O src/tools/pgindent/typedefs.list http://buildfarm.postgresql.org/cgi-bin/typedefs.pl
|
||||||
|
|
||||||
3) Remove all derived files (pgindent has trouble with one of the flex macros):
|
3) Remove all derived files (pgindent has trouble with one of the flex macros):
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ fi
|
|||||||
TYPEDEFS="$1"
|
TYPEDEFS="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
INDENT=`which indent`
|
||||||
|
|
||||||
trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
|
trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
|
||||||
entab </dev/null >/dev/null
|
entab </dev/null >/dev/null
|
||||||
if [ "$?" -ne 0 ]
|
if [ "$?" -ne 0 ]
|
||||||
@ -29,12 +31,12 @@ then echo "Go to the src/tools/entab directory and do a 'make' and 'make install
|
|||||||
echo "Then run $0 again."
|
echo "Then run $0 again."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
indent -? </dev/null >/dev/null 2>&1
|
$INDENT -? </dev/null >/dev/null 2>&1
|
||||||
if [ "$?" -ne 1 ]
|
if [ "$?" -ne 1 ]
|
||||||
then echo "You do not appear to have 'indent' installed on your system." >&2
|
then echo "You do not appear to have 'indent' installed on your system." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
indent -gnu </dev/null >/dev/null 2>&1
|
$INDENT -gnu </dev/null >/dev/null 2>&1
|
||||||
if [ "$?" -eq 0 ]
|
if [ "$?" -eq 0 ]
|
||||||
then echo "You appear to have GNU indent rather than BSD indent." >&2
|
then echo "You appear to have GNU indent rather than BSD indent." >&2
|
||||||
echo "See the pgindent/README file for a description of its problems." >&2
|
echo "See the pgindent/README file for a description of its problems." >&2
|
||||||
@ -136,7 +138,7 @@ do
|
|||||||
sed 's;^CATALOG(.*$;/*&*/;' >/tmp/$$a
|
sed 's;^CATALOG(.*$;/*&*/;' >/tmp/$$a
|
||||||
|
|
||||||
# We get the list of typedef's from /src/tools/find_typedef
|
# We get the list of typedef's from /src/tools/find_typedef
|
||||||
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
|
$INDENT -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
|
||||||
-lp -nip -npro -bbb $EXTRA_OPTS \
|
-lp -nip -npro -bbb $EXTRA_OPTS \
|
||||||
`egrep -v '^(FD_SET|date|interval|timestamp|ANY)$' "$TYPEDEFS" | sed -e '/^$/d' -e 's/.*/-T& /'` \
|
`egrep -v '^(FD_SET|date|interval|timestamp|ANY)$' "$TYPEDEFS" | sed -e '/^$/d' -e 's/.*/-T& /'` \
|
||||||
/tmp/$$a >/tmp/$$ 2>&1
|
/tmp/$$a >/tmp/$$ 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user