/[CCFs]/ccf-setup.sh
ViewVC logotype

Annotation of /ccf-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations)
Mon Feb 20 14:12:08 2017 UTC (7 years, 9 months ago) by ccflib
Branch: MAIN
Changes since 1.6: +62 -31 lines
File MIME type: application/x-sh
Adapted to run local SAS 15 version in local/SAS/xmmsas_20160201_1833. PERL5LIB and HEASOFT adapted to this version

1 ccflib 1.1 #!/bin/bash
2     #
3     # ccf-setup.sh
4     #
5     # Setup to build CCF from user's home
6     #
7 ccflib 1.7 # $Id: ccf-setup.sh,v 1.6 2016/03/18 15:59:17 ccflib Exp $
8 ccflib 1.1
9    
10 ccflib 1.3 host=`hostname | cut -d. -f1`
11    
12 ccflib 1.4 # Identify machine OS name and kernel type
13    
14     osname=`uname -s`
15    
16     cputype=`uname -m`
17    
18 ccflib 1.7 # Select where to work and define CCFLIB_HOME accordingly
19 ccflib 1.4
20 ccflib 1.3 case "$host" in
21 ccflib 1.7 # Exclude these hosts permanently
22     sasbld01|sasbld02|sasdmz01|sasdmz02)
23     echo "$host can not be used to build CCFs"
24     echo "Please log in instead either on sasbld01n/sasbld02n or use your own Linux WS"
25     exit ;;
26     # If you want to work on the servers
27     sasbld01n|sasbld02n|sasbld12)
28     kernelbits="64"
29     refhost=$host
30     GNUVER="6.2"
31     export CCFLIB_HOME=/home/ccflib ;;
32     # To work on the external server
33     xvsoc01)
34     kernelbits="32"
35     refhost="xvsoc01"
36     export CCFLIB_HOME=/data/xmm/ccflib ;;
37     # Just to work on any Linux WS
38     *)
39     kernelbits="64"
40     refhost="sasbld01n"
41     GNUVER="6.2"
42     cd /ccfbuild 2> /dev/null
43     if [ "$?" != "0" ] ; then
44     export CCFLIB_HOME=/xdata/ccflib
45     else
46     export CCFLIB_HOME=/ccfbuild
47     fi
48     ;;
49 ccflib 1.1 esac
50    
51 ccflib 1.7
52 ccflib 1.4 # Define where is the CCF development software
53    
54     export CCFDEV=${CCFLIB_HOME}/ccfdev
55    
56 ccflib 1.5 if [ ! -d "${CCFDEV}" ] ; then
57 ccflib 1.4 echo "ccf-setup.sh: ${CCFDEV} not found ! - Abort"
58     return
59     fi
60    
61     # Set the CVS access to CCF package repository
62    
63     export CVSROOT=${CCFLIB_HOME}/ccfcvs
64    
65 ccflib 1.7
66 ccflib 1.4 # Heasoft
67    
68 ccflib 1.6 case "$host" in
69 ccflib 1.7 # There is not Heasoft in xvsoc01
70 ccflib 1.6 xvsoc01) export LHEASOFT=1 ;;
71 ccflib 1.7 # For the time being we force to use the Heasoft installation used for SAS 15
72    
73     *)
74     #export HEADAS=/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture
75     export PATH=${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH}
76     unset PERL5LIB
77     export HEADAS="/sasbuild/local/sasbld02/headas/architecture"
78 ccflib 1.6 if [ ! -d "$HEADAS" ] ; then
79     echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
80     return
81     fi
82     . ${HEADAS}/headas-init.sh ;;
83     esac
84 ccflib 1.4
85     # SAS
86    
87 ccflib 1.7
88 ccflib 1.6 case "$host" in
89 ccflib 1.7 # Use an old SAS which still works fine!
90 ccflib 1.6 xvsoc01) export SAS_DIR=${CCFLIB_HOME}/xmmsas_20020413_2031
91     export SAS_PATH=$SAS_DIR
92     . $SAS_DIR/sas-setup.sh ;;
93 ccflib 1.7 # For the time being we force to use SAS 15 given that deceit does not work on SAS 16
94     *)
95     #/sas/bin/confsas
96     #. $HOME/setsas.sh 1> /dev/null
97     # For the time being we force to use SAS 15 given that deceit does not work on SAS 16
98     # The installation of SAS is local to CCFLIB_HOME under local/SAS
99     # This installation has been made with perl 5.18.4 as SAS_PERL so we use it.
100     . ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.sh 1> /dev/null
101     ;;
102 ccflib 1.6 esac
103    
104 ccflib 1.4 export SAS_MEMORY_MODEL=Low
105    
106 ccflib 1.1 # Adds some useful perl modules.
107 ccflib 1.7 #
108     # PERL5LIB includes so far the HEADAS and SAS perl5 subdirs
109 ccflib 1.1
110     if [ ! -z $PERL5LIB ]; then
111 ccflib 1.7 export PERL5LIB=${CCFLIB_HOME}/perl:${PERL5LIB}
112 ccflib 1.1 else
113     export PERL5LIB=${CCFLIB_HOME}/perl
114     fi
115    
116 ccflib 1.4 # From CCFDEV/setup.sh
117 ccflib 1.1
118 ccflib 1.7 export PERL5LIB=${CCFDEV}/lib/perl5:${PERL5LIB}
119 ccflib 1.1
120    
121 ccflib 1.4 # Add the scripts in $CCFLIB_HOME/bin to PATH
122 ccflib 1.1
123 ccflib 1.7 export PATH=${CCFLIB_HOME}/bin:${PATH}
124 ccflib 1.1
125 ccflib 1.4 # Unset MAKE if set
126 ccflib 1.1
127 ccflib 1.4 if [ ! -z "$MAKE" ] ; then
128     echo "ccf-setup.sh, WARNING: Your environment sets MAKE=$MAKE. It will be unset."
129     unset MAKE
130     fi
131 ccflib 1.1
132 ccflib 1.4 # Show it
133 ccflib 1.1
134 ccflib 1.4 echo
135 ccflib 1.7 echo "Heasoft & SAS reference information"
136     echo "==================================="
137     echo
138     echo "HEADAS = $HEADAS"
139     echo "Heasoft version = "`fversion`
140     echo
141 ccflib 1.4 echo
142     sasversion -V 2
143    
144     echo
145     echo "CCF building tools"
146     echo "=================="
147     echo
148     deceit -v
149     ccfextseq -v
150     echo
151     echo "CCF development environment"
152     echo "==========================="
153     echo
154     echo "CCFLIB_HOME = $CCFLIB_HOME"
155     echo "CCFDEV = $CCFDEV"
156     echo "CCF repository = $CVSROOT"
157     echo
158     echo "*** Ready !"
159     echo

  ViewVC Help
Powered by ViewVC 1.1.27