From 1901c9aa7e7bfb0b102ec57c38e3c046f6941cb1 Mon Sep 17 00:00:00 2001 From: sboyette Date: Wed, 14 Jan 2009 23:43:23 +0000 Subject: [PATCH] added --nocommit flag and associated variable. prevents the COMMIT at the bottom of SQL files git-svn-id: svn://svn.open-ils.org/ILS/trunk@11834 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/import/pg_loader.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/extras/import/pg_loader.pl b/Open-ILS/src/extras/import/pg_loader.pl index 25b540ff2a..ea365619b0 100755 --- a/Open-ILS/src/extras/import/pg_loader.pl +++ b/Open-ILS/src/extras/import/pg_loader.pl @@ -16,14 +16,15 @@ use Getopt::Long; my @files; my ($config, $output, @auto, @order, @wipe, $quiet) = ('/openils/conf/opensrf_core.xml'); - -GetOptions( - 'config=s' => \$config, - 'output=s' => \$output, - 'wipe=s' => \@wipe, - 'autoprimary=s' => \@auto, - 'order=s' => \@order, - 'quiet' => \$quiet, +my $nocommit = 0; + +GetOptions( 'config=s' => \$config, + 'output=s' => \$output, + 'wipe=s' => \@wipe, + 'autoprimary=s' => \@auto, + 'order=s' => \@order, + 'nocommit|n' => \$nocommit, + 'quiet' => \$quiet, ); my %lineset; @@ -130,5 +131,5 @@ for my $h (@order) { if (!grep { $_ eq $h} @auto); } -$output->print("COMMIT;\n\n"); +$output->print("COMMIT;\n\n") unless $nocommit; $output->close; -- 2.11.0