source: BAORadio/AmasNancay/trunk/submit2bqs-scaextractor.sh @ 576

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

u_irods_baoradio pour BQS (jec)

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 -l u_sps_baoradio,u_irods,u_irods_baoradio,T=100000,M=256MB,scratch=700MB,platform=LINUX -eo -o $jobLogName -N $jobBatchName -mb -me -mu ${LOGNAME}@lal.in2p3.fr <<EOF
62/afs/in2p3.fr/home/c/campagne/private/work/AmasNancay/scaextractor.sh  ${sourceRadio} ${force}
63EOF
Note: See TracBrowser for help on using the repository browser.