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

Last change on this file since 585 was 580, checked in by torrento, 14 years ago

add new scripts

  • Property svn:executable set to *
File size: 1.4 KB
Line 
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=
21force=
22while [ $# -gt 0 ]
23do
24 case "$1" in
25 -src) sourceRadio=$2; shift;;
26 -force) force="Yes";;
27 -h)
28 echo >&2 \
29 "usage: $0 -src souce"
30 exit 1;;
31 *) break;; # terminate while loop
32 esac
33 shift
34done
35
36#Path to public backupable path
37publicpath="/afs/in2p3.fr/home/c/campagne/public"
38
39
40#temporary files to synchronize scripts
41tmppublicpath=${TMPPUBLICPATH}
42$LS -l ${tmppublicpath} > /dev/null
43
44#Path of the utility scripts
45scriptpath=${SCRIPTPATH}
46
47#JEC 1/10/11 Use generic baodaqstatus name
48#the daq current irod status
49#tag=`${DATE} +%F`
50#OUT1=${publicpath}/baodaqstatus-${tag}.txt
51OUT1=${publicpath}/baodaqstatus-current.txt
52
53if [ ! -e ${OUT1} -o ! -r ${OUT1} ]; then
54 $ECHO "FATAL (${scriptName}): ${OUT1} has a problem"
55 exit 1
56fi
57
58jobBatchName="scaMaker-$sourceRadio"
59jobLogName="${jobBatchName}.log.$$"
60
61qsub -P P_baoradio -l sps=1,irods=1,ct=2000,vmem=256M,fsize=700M -o $jobLogName -j yes -N $jobBatchName -m be -M ${LOGNAME}@lal.in2p3.fr -V <<EOF
62
63${SCRIPTPATH}/scaextractor.sh ${sourceRadio} ${force}
64EOF
Note: See TracBrowser for help on using the repository browser.