[open-ils-commits] r11834 - trunk/Open-ILS/src/extras/import
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 14 18:43:28 EST 2009
Author: sboyette
Date: 2009-01-14 18:43:23 -0500 (Wed, 14 Jan 2009)
New Revision: 11834
Modified:
trunk/Open-ILS/src/extras/import/pg_loader.pl
Log:
added --nocommit flag and associated variable. prevents the COMMIT at the bottom of SQL files
Modified: trunk/Open-ILS/src/extras/import/pg_loader.pl
===================================================================
--- trunk/Open-ILS/src/extras/import/pg_loader.pl 2009-01-14 22:27:39 UTC (rev 11833)
+++ trunk/Open-ILS/src/extras/import/pg_loader.pl 2009-01-14 23:43:23 UTC (rev 11834)
@@ -16,14 +16,15 @@
my @files;
my ($config, $output, @auto, @order, @wipe, $quiet) =
('/openils/conf/opensrf_core.xml');
+my $nocommit = 0;
-GetOptions(
- 'config=s' => \$config,
- 'output=s' => \$output,
- 'wipe=s' => \@wipe,
- 'autoprimary=s' => \@auto,
- 'order=s' => \@order,
- 'quiet' => \$quiet,
+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 @@
if (!grep { $_ eq $h} @auto);
}
-$output->print("COMMIT;\n\n");
+$output->print("COMMIT;\n\n") unless $nocommit;
$output->close;
More information about the open-ils-commits
mailing list