ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/crab.sh
Revision: 1.4
Committed: Wed Mar 15 13:10:39 2006 UTC (19 years, 1 month ago) by fanzago
Content type: application/x-sh
Branch: MAIN
Changes since 1.3: +38 -4 lines
Log Message:
fixed configure bug, related with .bossrc dir

File Contents

# User Rev Content
1 slacapra 1.1 #! /bin/sh
2     # CRAB related Stuff
3 fanzago 1.4 export CRABDIR=/home_local/fanzago/CRAB_1_0_5
4 slacapra 1.1 export CRABSCRIPT=${CRABDIR}
5    
6     CRABPATH=${CRABDIR}/python
7     CRABPYTHON=${CRABDIR}/python
8    
9     if [ -z "$PATH" ]; then
10     export PATH=${CRABPATH}
11     else
12     export PATH=${CRABPATH}:${PATH}
13     fi
14     if [ -z "$PYTHONPATH" ]; then
15     export PYTHONPATH=${CRABPYTHON}
16     else
17     export PYTHONPATH=${CRABPYTHON}:${PYTHONPATH}
18     fi
19 slacapra 1.2
20 fanzago 1.4 # BOSS related Stuff
21     source /home_local/fanzago/CRAB_1_0_5/Boss/boss-v3_6_3/bossenv.sh
22    
23     # check whether central boss db is configured
24    
25     # check if .bossrc dir exists
26    
27     if [ ! -d ~/.bossrc ]; then
28     mkdir ~/.bossrc
29     fi
30    
31     # check if *clad files exist
32    
33     if [ ! -e ~/.bossrc/BossConfig.clad ]; then
34     if [ -e ~/BossConfig.clad ]; then
35     cp ~/BossConfig.clad ~/.bossrc/BossConfig.clad
36     else
37     echo "User-boss DB not installed: run configureBoss"
38     fi
39     fi
40     if [ ! -e ~/.bossrc/SQLiteConfig.clad ]; then
41     if [ -e ~/SQLiteConfig.clad ]; then
42     cp ~/SQLiteConfig.clad ~/.bossrc/SQLiteConfig.clad
43     else
44     echo "User-boss DB not installed: run configureBoss"
45     fi
46     fi
47     if [ ! -e ~/.bossrc/MySQLRTConfig.clad ]; then
48     if [ -e ~/MySQLRTConfig.clad ]; then
49     cp ~/MySQLRTConfig.clad ~/.bossrc/MySQLRTConfig.clad
50     else
51     echo "User-boss DB not installed: run configureBoss"
52     fi
53     fi
54     # now check a boss command to see if boss DB is up and running
55     if [ `boss clientID 1>/dev/null | grep -c "not correctly configured"` -ne 0 ]; then
56     echo "User-boss DB not installed: run configureBoss"
57 slacapra 1.2 fi