#! /bin/sh
. /usr/local/etc/fermi.shrc
ulimit -d unlimited -s unlimited -c 0
umask 002
echo ---------------------------------------------------------------
date
echo Begin setup of products needed
setup dp v8_11 -f OSF1 -z /p/cluster_disk/upsdb
setup plate v3_5 -f OSF1 -z /p/cluster_disk/upsdb
echo Done setup of products needed
echo ---------------------------------------------------------------
date
echo PATH = $PATH
echo ---------------------------------------------------------------
date
printenv | grep _DIR | sort
cd /opdb/d1/data/drillRuns/dr2001.4
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 ALL DONE
exit

