ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/installCmsSw.sh
Revision: 1.2
Committed: Sat Jun 5 02:36:28 2010 UTC (14 years, 11 months ago) by paus
Content type: application/x-sh
Branch: MAIN
CVS Tags: Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a
Changes since 1.1: +60 -0 lines
Log Message:
Wow I forgot all about my cvs.

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     # ex. installCmsSw.sh <version>, _ex._ installCmsSw 3_6_1
6     #
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     echo " ex. installCmsSw.sh 3_6_1"
22     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;