Index: trunk/ippScripts/scripts/phase2.pl
===================================================================
--- trunk/ippScripts/scripts/phase2.pl	(revision 10757)
+++ trunk/ippScripts/scripts/phase2.pl	(revision 11110)
@@ -22,4 +22,5 @@
     $input,			# Input FITS file
     $camera,			# Camera
+    $outpath,			# Outpath
     $no_update			# Don't update the database?
     );
@@ -29,4 +30,5 @@
     'uri|u=s'       => \$input,
     'camera|c=s'    => \$camera,
+    'outpath|o=s'   => \$outpath,
     'no-update'     => \$no_update
 ) or pod2usage( 2 );
@@ -34,9 +36,10 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --exp_tag --class_id --uri --camera",
+    -msg => "Required options: --exp_tag --class_id --uri --camera --outpath",
     -exitval => 3,
 ) unless defined $expTag 
     and defined $classId 
     and defined $input
+    and defined $outpath
     and defined $camera;
 
@@ -49,8 +52,10 @@
 die "Can't find required tools.\n" if $missing_tools;
 
+# XXX old verion Output file name
+# XXX old version (drop) : my ($vol, $dir, $file) = File::Spec->splitpath( $input );
+
 ### Output file name --- must match camera configuration!
-my ($vol, $dir, $file) = File::Spec->splitpath( $input );
 my $outputRoot =  $expTag . '.p2';
-$outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
+$outputRoot = File::Spec->catpath( $outpath, $outputRoot );
 $outputRoot = $ipprc->convert_filename_absolute($outputRoot);
 $input = $ipprc->convert_filename_absolute ( $input );
