#!/bin/csh

#
# PRY, 20-Feb-2007
#  Script that unpacks the planning tar files from Japan. It also copies
#  over the latest study database files from Solarsoft into eis_database
#

cd /home/young

echo 'Removing existing directories...'
rm -rf /home/young/planning_db/*
#rm -rf idl_eis/*
rm -rf /home/young/cmdpln/*
rm -rf /home/young/EIS_CPT_output

echo 'Unpacking database files...'
#cd /home/young
tar xf planning_db.tar.gz

#tar xvf idl_planning.tar idl_eis

echo 'Unpacking cmdpln files...'
#cd /home/young
tar xf cmdpln.tar.gz

echo 'Unpacking CPT files...'
#cd /home/young
tar xf cpt_output.tar.gz

#
# copy most up-to-date study and raster database into eis_database
#
echo 'Copying study databases...'
cp -r /solsoft/solarsoft/hinode/eis/database/planning_db/technical_db /home/young/planning_db
cp -r /solsoft/solarsoft/hinode/eis/database/planning_db/study_descriptions /home/young/planning_db

rm /home/young/planning_db.tar.gz
#rm idl_planning.tar
rm /home/young/cmdpln.tar.gz
rm /home/young/cpt_output.tar.gz
