Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c4d1243

Browse files
committed
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.
1 parent 52b6053 commit c4d1243

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/tools/pgindent/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
1010

1111
2) Download the typedef file from the buildfarm:
1212

13-
wget -O src/tools/pgindent/typedefs.list http://www.pgbuildfarm.org/cgi-bin/typedefs.pl
13+
wget -O src/tools/pgindent/typedefs.list http://buildfarm.postgresql.org/cgi-bin/typedefs.pl
1414

1515
3) Remove all derived files (pgindent has trouble with one of the flex macros):
1616

src/tools/pgindent/pgindent

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ fi
2121
TYPEDEFS="$1"
2222
shift
2323

24+
INDENT=`which indent`
25+
2426
trap "rm -f /tmp/$$ /tmp/$$a" 0 1 2 3 15
2527
entab </dev/null >/dev/null
2628
if [ "$?" -ne 0 ]
@@ -29,12 +31,12 @@ then echo "Go to the src/tools/entab directory and do a 'make' and 'make install
2931
echo "Then run $0 again."
3032
exit 1
3133
fi
32-
indent -? </dev/null >/dev/null 2>&1
34+
$INDENT -? </dev/null >/dev/null 2>&1
3335
if [ "$?" -ne 1 ]
3436
then echo "You do not appear to have 'indent' installed on your system." >&2
3537
exit 1
3638
fi
37-
indent -gnu </dev/null >/dev/null 2>&1
39+
$INDENT -gnu </dev/null >/dev/null 2>&1
3840
if [ "$?" -eq 0 ]
3941
then echo "You appear to have GNU indent rather than BSD indent." >&2
4042
echo "See the pgindent/README file for a description of its problems." >&2
@@ -136,7 +138,7 @@ do
136138
sed 's;^CATALOG(.*$;/*&*/;' >/tmp/$$a
137139

138140
# We get the list of typedef's from /src/tools/find_typedef
139-
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
141+
$INDENT -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 \
140142
-lp -nip -npro -bbb $EXTRA_OPTS \
141143
`egrep -v '^(FD_SET|date|interval|timestamp|ANY)$' "$TYPEDEFS" | sed -e '/^$/d' -e 's/.*/-T& /'` \
142144
/tmp/$$a >/tmp/$$ 2>&1

0 commit comments

Comments
 (0)