#!/usr/bin/tcsh

set oasis=/oasisnt/oasis
set lockfile=$oasis/bin/download.lock
set record_file=$oasis/raw/oasis.rcd

if ( -e $lockfile ) then
 echo Process already running: Exiting
 exit
endif

#echo Creating lock file...
touch $lockfile

#echo Downloading D4...
#tcsh $oasis/bin/getD4

#echo Downloading D1...
#tcsh $oasis/bin/getD1

#echo Downloading M1...
#eJr. relay wakeup line
#echo R > /dev/com2
tcsh $oasis/bin/getM1


#echo Downloading M2...
#echo R > /dev/com4
#tcsh $oasis/bin/getM2

#echo Downloading EP1...
#echo R > /dev/ttyS4
#tcsh $oasis/bin/getEP1

#echo Downloading EP2
#echo S > /dev/ttyS4
#tcsh $oasis/bin/getEPtest

#echo Deleting lock file...
rm -rf $lockfile

#deleting the oasis.rcd file because of problem with extract and 200kB files
#rm -rf $record_file

#echo Normal Exit
exit

