From: Bruce Momjian Date: Fri, 12 Apr 2013 15:42:27 +0000 (-0400) Subject: pgindent: fix downloading of BSD indent binary X-Git-Tag: REL9_3_BETA1~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8daa4e960e15eb31e141585968c91cc666889585;p=postgresql pgindent: fix downloading of BSD indent binary Also fix accessing pgentab binary and tar. Gurjeet Singh --- diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index ce72883fd8..2e9d443918 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -59,7 +59,7 @@ my $filtered_typedefs_fh; sub check_indent { - system("entab < $devnull"); + system("$entab < $devnull"); if ($?) { print STDERR @@ -448,29 +448,28 @@ sub run_build $ENV{PGTYPEDEFS} = abs_path('tmp_typedefs.list'); + my $pg_bsd_indent_name = "pg_bsd_indent-" . $INDENT_VERSION . ".tar.gz"; + $rv = - getstore("ftp://ftp.postgresql.org/pub/dev/indent.netbsd.patched.tgz", - "indent.netbsd.patched.tgz"); + getstore("ftp://ftp.postgresql.org/pub/dev/$pg_bsd_indent_name", + "pg_bsd_indent.tgz"); - die "fetching indent.netbsd.patched.tgz" unless is_success($rv); + die "fetching $pg_bsd_indent_name" unless is_success($rv); # XXX add error checking here - mkdir "bsdindent"; - chdir "bsdindent"; - system("tar -z -xf ../indent.netbsd.patched.tgz"); + system("tar -z -xf pg_bsd_indent.tgz"); + chdir "pg_bsd_indent"; system("make > $devnull 2>&1"); - $ENV{PGINDENT} = abs_path('indent'); + $ENV{PGINDENT} = abs_path('pg_bsd_indent'); chdir "../../entab"; - system("make > $devnull 2>&1"); $ENV{PGENTAB} = abs_path('entab'); chdir $save_dir; - }