Last change
on this file since 670 was
627,
checked in by campagne, 13 years ago
|
correct case esac structure (jec)
|
-
Property svn:executable set to
*
|
File size:
1.6 KB
|
Rev | Line | |
---|
[580] | 1 | #!/bin/sh -xvf |
---|
| 2 | DATE=/bin/date |
---|
| 3 | GREP=/bin/grep |
---|
| 4 | AWK=/bin/awk |
---|
| 5 | ECHO=/bin/echo |
---|
| 6 | WC=/usr/bin/wc |
---|
| 7 | CAT=/bin/cat |
---|
| 8 | PRINTF=/usr/bin/printf |
---|
| 9 | FIND=/usr/bin/find |
---|
| 10 | MKDIR=/bin/mkdir |
---|
| 11 | XARGS=/usr/bin/xargs |
---|
| 12 | SORT=/bin/sort |
---|
| 13 | RM=/bin/rm |
---|
| 14 | TR=/usr/bin/tr |
---|
| 15 | CP=/bin/cp |
---|
| 16 | LS=/bin/ls |
---|
| 17 | CHMOD=/bin/chmod |
---|
| 18 | |
---|
| 19 | #Process cmd line args: the -src option is mandatory (source name as Abell85) |
---|
| 20 | sourceRadio= |
---|
[626] | 21 | dateSelect= |
---|
[580] | 22 | force= |
---|
[626] | 23 | forDriftScan= |
---|
| 24 | |
---|
[580] | 25 | while [ $# -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 |
---|
| 39 | done |
---|
| 40 | |
---|
| 41 | #Path to public backupable path |
---|
| 42 | publicpath="/afs/in2p3.fr/home/c/campagne/public" |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | #temporary files to synchronize scripts |
---|
| 46 | tmppublicpath=${TMPPUBLICPATH} |
---|
| 47 | $LS -l ${tmppublicpath} > /dev/null |
---|
| 48 | |
---|
| 49 | #Path of the utility scripts |
---|
| 50 | scriptpath=${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 |
---|
| 56 | OUT1=${publicpath}/baodaqstatus-current.txt |
---|
| 57 | |
---|
| 58 | if [ ! -e ${OUT1} -o ! -r ${OUT1} ]; then |
---|
| 59 | $ECHO "FATAL (${scriptName}): ${OUT1} has a problem" |
---|
| 60 | exit 1 |
---|
| 61 | fi |
---|
| 62 | |
---|
| 63 | jobBatchName="scaMaker-$sourceRadio" |
---|
| 64 | jobLogName="${jobBatchName}.log.$$" |
---|
| 65 | |
---|
[626] | 66 | qsub -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] | 69 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.