Last change
on this file since 654 was 627, checked in by campagne, 14 years ago |
correct case esac structure (jec)
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
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=
|
---|
21 | dateSelect=
|
---|
22 | force=
|
---|
23 | forDriftScan=
|
---|
24 |
|
---|
25 | while [ $# -gt 0 ]
|
---|
26 | do
|
---|
27 | case "$1" in
|
---|
28 | -src) sourceRadio=$2; shift;;
|
---|
29 | -date) dateSelect=$2; shift;;
|
---|
30 | -force) force="-force";;
|
---|
31 | -drift) forDriftScan="-drift";;
|
---|
32 | -h)
|
---|
33 | echo >&2 \
|
---|
34 | "usage: $0 -src source -date YYYYMMDD [-force] [-drift]"
|
---|
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 |
|
---|
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
|
---|
67 |
|
---|
68 | ${SCRIPTPATH}/scaextractor.sh -src ${sourceRadio} -date ${dateSelect} ${force} ${forDriftScan}
|
---|
69 | EOF
|
---|
Note:
See
TracBrowser
for help on using the repository browser.