#!/usr/local/bin/bash
##
# WARNING: THIS SCRIPT WAS AUTOMATICALLY GENERATED on Sun Jul 22 15:57:02 CDT 2007
#   dp version: v19_59        DP_DIR: /sdss/ups/prd/dp/v19_59/NULL
#   on host     sdssdp0       user: hlin
##
. /fnal/ups/etc/setups.sh
ulimit -d unlimited -s unlimited -c 0
umask 002
echo -e "---------------------------------------------------------------"
date
echo -e "Begin setup of products needed"
setup dp 
setup plate 
echo -e "Done setup of products needed"
echo -e "---------------------------------------------------------------"
date
echo -e "PATH = $PATH"
echo -e "---------------------------------------------------------------"
date
printenv | grep _DIR | sort
echo -e "---------------------------------------------------------------"
echo -e "Kerberos Data: (klist -f)"
/usr/krb5/bin/klist -f
echo -e "---------------------------------------------------------------"
cd /opdb/d1/data/drillRuns/dr2007.07.2
echo ---------------------------------------------------------------
date
echo Begin running plate
echo ---------------------------------------------------------------
date
echo "Begin running \"makePlates -verbose=2\""
plate -noTk -command "makePlates -verbose=2" 
if [ $? -ne 0 ] 
then
    echo "Error: \"makePlates -verbose=2\" failed."
    exit 1
fi
echo ---------------------------------------------------------------
date
echo "Begin running \"fiberPlates -verbose=2 -skipBrightCheck\""
plate -noTk -command "fiberPlates -verbose=2 -skipBrightCheck" 
if [ $? -ne 0 ] 
then
    echo "Error: \"fiberPlates -verbose=2 -skipBrightCheck\" failed."
    exit 1
fi
echo ---------------------------------------------------------------
date
echo "Begin running \"makeFanuc -verbose=2\""
plate -noTk -command "makeFanuc -verbose=2" 
if [ $? -ne 0 ] 
then
    echo "Error: \"makeFanuc -verbose=2\" failed."
    exit 1
fi
echo ---------------------------------------------------------------
date
echo "Begin running \"makeDrillPos -verbose=2\""
plate -noTk -command "makeDrillPos -verbose=2" 
if [ $? -ne 0 ] 
then
    echo "Error: \"makeDrillPos -verbose=2\" failed."
    exit 1
fi
echo Done running plate
echo ---------------------------------------------------------------
date
echo "Begin running \"plateEnder dr2007.07.2 -morePipes 1\""
plate -noTk -command "plateEnder dr2007.07.2 -morePipes 1 " 
if [ $? -ne 0 ] 
then
    echo "Error: \"plateEnder dr2007.07.2 -morePipes 1\" failed."
    exit 1
fi
echo ---------------------------------------------------------------
date
echo ALL DONE
exit

