Index: trunk/ippScripts/scripts/ipp_inject_fileset.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_inject_fileset.pl	(revision 16490)
+++ trunk/ippScripts/scripts/ipp_inject_fileset.pl	(revision 16552)
@@ -23,5 +23,5 @@
 
 # Parse the command-line arguments
-my ($camera, $telescope, $workdir, $reduction, $dvo_db, $tess_id, $end_stage, $label, $dbname, $help);
+my ($camera, $telescope, $workdir, $reduction, $dvo_db, $tess_id, $end_stage, $label, $dbname, $no_update, $no_op, $help);
 GetOptions('camera|i=s'     => \$camera, # user-supplied camera name
 	   'telescope|t=s'  => \$telescope, # user-supplied telescope name
@@ -32,6 +32,8 @@
 	   'end_stage=s'    => \$end_stage, # stop processing at this step
 	   'label=s'        => \$label,     # stop processing at this step
-	   'dbname|d=s'     => \$dbname, # Database name
-	   'help'           => \$help # give help listing
+	   'dbname|d=s'     => \$dbname,    # Database name
+	   'no-update'      => \$no_update, # Update the database?
+	   'no-op'          => \$no_op,     # Don't do any operations?
+	   'help'           => \$help       # give help listing
 	   ) or pod2usage( 2 );
 
@@ -95,10 +97,15 @@
 $command_exp .= " -dbname $dbname"       if defined $dbname;
 
-my ( $success_exp, $error_code_exp, $full_buf_exp, $stdout_buf_exp, $stderr_buf_exp ) =
-    run( command => $command_exp, verbose => 1 );
-die "Unable to inject $exp_name: $error_code_exp\n" if not $success_exp;
+my $exp_id = 0;
+unless ($no_op) {
+    my ( $success_exp, $error_code_exp, $full_buf_exp, $stdout_buf_exp, $stderr_buf_exp ) =
+	run( command => $command_exp, verbose => 1 );
+    die "Unable to inject $exp_name: $error_code_exp\n" if not $success_exp;
 
-my @line = split(/\s+/, $$stdout_buf_exp[0]); # The output line, containing the exposure tag
-my $exp_id = $line[2];	# The exposure tag
+    my @line = split(/\s+/, $$stdout_buf_exp[0]); # The output line, containing the exposure tag
+    $exp_id = $line[2];	# The exposure tag
+} else {
+    print "skipping command: $command_exp\n";
+}
 
 # now inject the imfiles one at a time
@@ -117,6 +124,10 @@
     $command_imfile .= " -dbname $dbname" if defined ($dbname);
     
-    my ( $success_imfile, $error_code_imfile, $full_buf_imfile, $stdout_buf_imfile, $stderr_buf_imfile ) = run( command => $command_imfile, verbose => 1 );
-    die "Unable to inject $exp_name imfile: $error_code_imfile\n" if not $success_imfile;
+    unless ($no_op) {
+	my ( $success_imfile, $error_code_imfile, $full_buf_imfile, $stdout_buf_imfile, $stderr_buf_imfile ) = run( command => $command_imfile, verbose => 1 );
+	die "Unable to inject $exp_name imfile: $error_code_imfile\n" if not $success_imfile;
+    } else {
+	print "skipping command: $command_imfile\n";
+    }
 }
 
@@ -127,6 +138,10 @@
 $command_update .= " -dbname $dbname" if defined ($dbname);
 
-my ( $success_update, $error_code_update, $full_buf_update, $stdout_buf_update, $stderr_buf_update ) = run( command => $command_update, verbose => 1 );
-die "Unable to update $exp_name: $error_code_update\n" if not $success_update;
+unless ($no_update) {
+    my ( $success_update, $error_code_update, $full_buf_update, $stdout_buf_update, $stderr_buf_update ) = run( command => $command_update, verbose => 1 );
+    die "Unable to update $exp_name: $error_code_update\n" if not $success_update;
+} else {
+    print "skipping command: $command_update\n";
+}
 
 exit 0;
