Index: /trunk/pstamp/Makefile.am
===================================================================
--- /trunk/pstamp/Makefile.am	(revision 16674)
+++ /trunk/pstamp/Makefile.am	(revision 16675)
@@ -1,3 +1,3 @@
-SUBDIRS = src
+SUBDIRS = src scripts
 
 CLEANFILES = *~ core core.*
Index: /trunk/pstamp/configure.ac
===================================================================
--- /trunk/pstamp/configure.ac	(revision 16674)
+++ /trunk/pstamp/configure.ac	(revision 16675)
@@ -4,4 +4,5 @@
 AC_INIT([ppstamp], [0.1.1], [ipp-support@ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([src])
+AC_CONFIG_SRCDIR([scripts])
 
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2])
@@ -44,4 +45,5 @@
   Makefile
   src/Makefile
+  scripts/Makefile
 ])
 
Index: /trunk/pstamp/scripts/.cvsignore
===================================================================
--- /trunk/pstamp/scripts/.cvsignore	(revision 16675)
+++ /trunk/pstamp/scripts/.cvsignore	(revision 16675)
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
Index: /trunk/pstamp/scripts/Makefile.am
===================================================================
--- /trunk/pstamp/scripts/Makefile.am	(revision 16675)
+++ /trunk/pstamp/scripts/Makefile.am	(revision 16675)
@@ -0,0 +1,15 @@
+
+installdir = $(bindir)
+
+install_files = \
+	ppstamp_run.pl \
+	pstamp_listjobs.pl \
+	pstamp_new_request.sh \
+	pstamp_parser_run.pl \
+	pstamp_queue_requests.pl \
+	pstamp_runcommand.sh \
+	pstamp_webrequest.pl
+
+install_SCRIPTS = $(install_files)
+
+ACLOCAL_AMFLAGS = -I m4
Index: /trunk/pstamp/scripts/pstamp_new_request.sh
===================================================================
--- /trunk/pstamp/scripts/pstamp_new_request.sh	(revision 16674)
+++ /trunk/pstamp/scripts/pstamp_new_request.sh	(revision 16675)
@@ -47,10 +47,12 @@
 # Invoke the data store registration script
 echo $request_file chip n/a | dsreg -dsdir $DATA_STORE -add -type PSTAMP $PRODUCT $fileset_id
+
 status=$?
-if [[ $status != 0 ]]; then
+if [[ $status != 0 ]] ; then
     echo dsreg failed: $status
     rm -r $dir_path
     exit $status
-end
+fi
 
 exit 0
+
Index: /trunk/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 16674)
+++ /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 16675)
@@ -19,8 +19,4 @@
 my $request_id = $ARGV[0];
 
-# XXX: CONFIGURATION: get these from a configuration file
-my $inputWorkdir = "/export/data1/bills/pstamp/work/$request_id";
-my $outputDataStoreRoot = "/var/www/html/ds/dsroot";
-my $defaultOutputRoot = $outputDataStoreRoot;
 
 use IPC::Cmd 0.36 qw( can_run run );
@@ -42,4 +38,19 @@
 		       );
 
+my $ipprc = PS::IPP::Config->new(); # IPP Configuration
+
+#my $outputDataStoreRoot = "/var/www/html/ds/dsroot";
+
+my $outputDataStoreRoot = metadataLookupStr($ipprc->{_ipprc}, 'PSTAMP_DATA_STORE_ROOT');
+exit ($PS_EXIT_CONFIG_ERROR) unless defined $outputDataStoreRoot;
+my $defaultOutputRoot = $outputDataStoreRoot;
+
+
+#my $inputWorkdir = "/export/data1/bills/pstamp/work/$request_id";
+
+my $inputWorkdir = metadataLookupStr($ipprc->{_ipprc}, 'PSTAMP_WORKDIR');
+exit ($PS_EXIT_CONFIG_ERROR) unless defined $inputWorkdir;
+$inputWorkdir .= "/$request_id";
+    
 my $missing_tools;
 
