added --nocommit flag and associated variable. prevents the COMMIT at the bottom...
authorsboyette <sboyette@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jan 2009 23:43:23 +0000 (23:43 +0000)
committersboyette <sboyette@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jan 2009 23:43:23 +0000 (23:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11834 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/import/pg_loader.pl

index 25b540f..ea36561 100755 (executable)
@@ -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;