ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/installCmsSw.sh
Revision: 1.3
Committed: Thu Mar 31 08:37:21 2011 UTC (14 years, 1 month ago) by ceballos
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, HEAD
Branch point for: Mit_025c_branch
Changes since 1.2: +2 -2 lines
Log Message:
fix

File Contents

# User Rev Content
1 paus 1.2 #!/bin/bash
2     #---------------------------------------------------------------------------------------------------
3     # Install a given version of the CMSSW software locally at MIT.
4     #
5 ceballos 1.3 # ex. installCmsSw.sh <version>, _ex._ installCmsSw 5_1_5
6 paus 1.2 #
7     # Author: C.Paus (June 4, 2010)
8     #---------------------------------------------------------------------------------------------------
9     # define the general setup
10     export VO_CMS_SW_DIR=/server/02a/cmsprod/cmssoft
11     export SCRAM_ARCH=slc5_ia32_gcc434
12    
13     # Read the environment
14     export MY_CMSSW_VERSION="$1"
15     if [ ".$MY_CMSSW_VERSION" == "." ]
16     then
17     echo
18     echo "Please specify the desired software version."
19     echo
20     echo " usage: installCmsSw.sh <version>"
21 ceballos 1.3 echo " ex. installCmsSw.sh 5_1_5"
22 paus 1.2 echo
23     exit 1
24     fi
25    
26     # get the apt setup
27     echo VO_CMS_SW_DIR $VO_CMS_SW_DIR
28     export aptInit=`echo $VO_CMS_SW_DIR/$SCRAM_ARCH/external/apt/*/etc/profile.d/init.sh`
29     echo
30     echo "AptInit setup: $aptInit"
31     echo
32     echo " starting in 4 seconds...."
33     echo
34     sleep 4
35     source $aptInit
36    
37     # say what we do
38     echo
39     echo "Trying to install CMSSW version $MY_CMSSW_VERSION"
40     echo "to directory $VO_CMS_SW_DIR"
41     echo
42     echo "df -h $VO_CMS_SW_DIR"; df -h $VO_CMS_SW_DIR
43     echo
44     echo " starting in 4 seconds...."
45     echo
46     sleep 4
47    
48     # update and get installation
49     apt-get update
50     # check what we have to offer
51     # apt-cache search cmssw | grep ${MY_CMSSW_VERSION}
52    
53     if [ "`echo ${MY_CMSSW_VERSION} | grep patch `" != "" ]
54     then
55     apt-get install cms+cmssw-patch+CMSSW_${MY_CMSSW_VERSION}
56     else
57     apt-get install cms+cmssw+CMSSW_${MY_CMSSW_VERSION}
58     fi
59    
60     exit 0;