source: BAORadio/AmasNancay/trunk/submit2ge-scaextractor.sh @ 682

Last change on this file since 682 was 627, checked in by campagne, 13 years ago

correct case esac structure (jec)

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[580]1#!/bin/sh -xvf
2DATE=/bin/date
3GREP=/bin/grep
4AWK=/bin/awk
5ECHO=/bin/echo
6WC=/usr/bin/wc
7CAT=/bin/cat
8PRINTF=/usr/bin/printf
9FIND=/usr/bin/find
10MKDIR=/bin/mkdir
11XARGS=/usr/bin/xargs
12SORT=/bin/sort
13RM=/bin/rm
14TR=/usr/bin/tr
15CP=/bin/cp
16LS=/bin/ls
17CHMOD=/bin/chmod
18
19#Process cmd line args: the -src option is mandatory (source name as Abell85)
20sourceRadio=
[626]21dateSelect=
[580]22force=
[626]23forDriftScan=
24
[580]25while [ $# -gt 0 ]
[626]26  do
[580]27  case "$1" in
28      -src)  sourceRadio=$2; shift;;
[626]29      -date) dateSelect=$2; shift;;
[627]30      -force) force="-force";;
31      -drift) forDriftScan="-drift";;
[626]32       -h)
33            echo >&2 \
34            "usage: $0 -src source -date YYYYMMDD [-force] [-drift]"
[580]35            exit 1;;
36        *)  break;;     # terminate while loop
37    esac
38    shift
39done
40
41#Path to public backupable path
42publicpath="/afs/in2p3.fr/home/c/campagne/public"
43
44
45#temporary files to synchronize scripts
46tmppublicpath=${TMPPUBLICPATH}
47$LS -l ${tmppublicpath} > /dev/null
48
49#Path of the utility scripts
50scriptpath=${SCRIPTPATH}
51
52#JEC 1/10/11 Use generic baodaqstatus name
53#the daq current irod status
54#tag=`${DATE} +%F`
55#OUT1=${publicpath}/baodaqstatus-${tag}.txt
56OUT1=${publicpath}/baodaqstatus-current.txt
57
58if [ ! -e ${OUT1}  -o ! -r ${OUT1} ]; then
59    $ECHO "FATAL (${scriptName}): ${OUT1} has a problem"
60    exit 1
61fi
62
63jobBatchName="scaMaker-$sourceRadio"
64jobLogName="${jobBatchName}.log.$$"
65
[626]66qsub -P P_baoradio -l sps=1,irods=1,ct=100,vmem=256M,fsize=70M -o ${PWD}/${jobLogName} -j yes -N $jobBatchName -m be -M ${LOGNAME}@lal.in2p3.fr -V <<EOF
[580]67
[626]68${SCRIPTPATH}/scaextractor.sh  -src ${sourceRadio} -date ${dateSelect} ${force} ${forDriftScan}
[580]69EOF
Note: See TracBrowser for help on using the repository browser.