Skip to content

Commit 8daa4e9

Browse files
committed
pgindent: fix downloading of BSD indent binary
Also fix accessing pgentab binary and tar. Gurjeet Singh
1 parent f8a54e9 commit 8daa4e9

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/tools/pgindent/pgindent

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ my $filtered_typedefs_fh;
5959

6060
sub check_indent
6161
{
62-
system("entab < $devnull");
62+
system("$entab < $devnull");
6363
if ($?)
6464
{
6565
print STDERR
@@ -448,29 +448,28 @@ sub run_build
448448

449449
$ENV{PGTYPEDEFS} = abs_path('tmp_typedefs.list');
450450

451+
my $pg_bsd_indent_name = "pg_bsd_indent-" . $INDENT_VERSION . ".tar.gz";
452+
451453
$rv =
452-
getstore("ftp://ftp.postgresql.org/pub/dev/indent.netbsd.patched.tgz",
453-
"indent.netbsd.patched.tgz");
454+
getstore("ftp://ftp.postgresql.org/pub/dev/$pg_bsd_indent_name",
455+
"pg_bsd_indent.tgz");
454456

455-
die "fetching indent.netbsd.patched.tgz" unless is_success($rv);
457+
die "fetching $pg_bsd_indent_name" unless is_success($rv);
456458

457459
# XXX add error checking here
458460

459-
mkdir "bsdindent";
460-
chdir "bsdindent";
461-
system("tar -z -xf ../indent.netbsd.patched.tgz");
461+
system("tar -z -xf pg_bsd_indent.tgz");
462+
chdir "pg_bsd_indent";
462463
system("make > $devnull 2>&1");
463464

464-
$ENV{PGINDENT} = abs_path('indent');
465+
$ENV{PGINDENT} = abs_path('pg_bsd_indent');
465466

466467
chdir "../../entab";
467-
468468
system("make > $devnull 2>&1");
469469

470470
$ENV{PGENTAB} = abs_path('entab');
471471

472472
chdir $save_dir;
473-
474473
}
475474

476475

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy