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

Diff of /ccf-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by ccflib, Fri Dec 12 13:49:27 2014 UTC revision 1.10 by ccflib, Wed Nov 6 09:23:05 2019 UTC
# Line 2  Line 2 
2  #  #
3  # ccf-setup.sh  # ccf-setup.sh
4  #  #
5  # Setup to build CCF from user's home  # (C) ESA 1999-2019
6  #  #
7  # $Id: ccf-setup.sh,v 1.4 2014/12/12 13:47:39 ccflib Exp $  # $Id: ccf-setup.sh,v 1.9 2017/12/22 13:25:04 ccflib Exp $
8    
9    
10  host=`hostname | cut -d. -f1`  host=`hostname | cut -d. -f1`
11    
 # Identify machine OS name and kernel type  
12    
13  osname=`uname -s`  # CCF can be made on the following hosts:
14    #
15  cputype=`uname -m`  #    1) user's workstations
16    #       refhost is then a reference SAS builder like sasbld01n
17  case "$cputype" in  #       CCFLIB_HOME is set to the remote ccflib home on /xdata/ccflib
18    i[3,4,5,6]86) kernelbits=32 ; refhost="sasbld01" ;;  #
19    x86_64)       kernelbits=64 ; refhost="sasbld02" ;;  #    2) any SAS builder
20  esac  #       refhost is itself
21    #       CCFLIB_HOME is also the ccflib home directory.
22    #       There is one exception to these rules: xmac01
23    #
24    
25  # Define CCFLIB_HOME  GNUVER="7.1"
26    
27  case "$host" in  case "$host" in
28     sasbld01) export CCFLIB_HOME=/home/ccflib ;;          sasbld0[1,4]n)
29     *)        export CCFLIB_HOME=/ccfbuild    ;;                  refhost=$host
30                    export CCFLIB_HOME=/home/ccflib
31            ;;
32            xmac01)
33                    refhost=$host
34                    export CCFLIB_HOME=/xdata/ccflib
35            ;;
36            *)  
37                    refhost="sasbld01n"
38                    export CCFLIB_HOME=/xdata/ccflib
39           ;;
40  esac  esac
41    
42    if [ -z "$CCFLIB_HOME" ] ; then
43            echo "Error: ccf-setup.sh: Undefined $CCFLIB_HOME - Fix it!"
44            return
45    fi
46    
47  # Define where is the CCF development software  # Define where is the CCF development software
48    
49  export CCFDEV=${CCFLIB_HOME}/ccfdev  export CCFDEV=${CCFLIB_HOME}/ccfdev
50    
51  if [ ! -d "${CCFDEV}" ] ; then  if [ ! -d "${CCFDEV}" ] ; then
52     echo "ccf-setup.sh: ${CCFDEV} not found ! - Abort"     echo "Error: ccf-setup.sh: ${CCFDEV} not found ! - Abort"
53     return     return
54  fi  fi
55    
# Line 40  fi Line 57  fi
57    
58  export CVSROOT=${CCFLIB_HOME}/ccfcvs  export CVSROOT=${CCFLIB_HOME}/ccfcvs
59    
 # Heasoft  
60    
61  export HEADAS=/sasbuild/local/${refhost}/headas/architecture  # Heasoft and SAS
62  if [ ! -d "$HEADAS" ] ; then  #
63     echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"  #                       I M P O R T A N T    N O T E
64     return  #
65  fi  # We are using old versions of both due to a problem with deceit in latest versions
66  . ${HEADAS}/headas-init.sh  #
67    # Heasoft
68    
69    
70    case "$host" in
71    
72    
73            # For the time being we force to use the Heasoft installation used for SAS 15
74    
75            xmac01)
76                    export PATH=/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/perl/bin:$PATH
77                    unset PERL5LIB
78                    export HEADAS=/sasbuild/local/xmac01/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture
79                    if [ ! -d "$HEADAS" ] ; then
80                            echo "Error: ccf-setup.sh: ${HEADAS} does not exist - Abort"
81                            return
82                    fi
83                    . ${HEADAS}/headas-init.sh  ;;
84    
85                    
86            # Temporary fix: The SAS 16 and 16.1 deceit and ccfextseq tasks do not work
87            # We must use SAS 15 which is not depending on GNUVER
88    
89            *)
90            #
91            # For the old versions of Heasoft and SAS we used a different perl
92            #
93            #export HEADAS=/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture
94            #export PATH=${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH}
95            export PATH=/xdata/sasbuild/local/sasbld02/perl_5.10.1/bin:$PATH
96            export PERL5LIB=/xdata/sasbuild/local/sasbld02/perl_5.10.1/lib:$PERL5LIB
97            export HEADAS="/xdata/sasbuild/local/sasbld02/headas/architecture"
98                    if [ ! -d "$HEADAS" ] ; then
99                            echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
100                            return
101                    fi
102                    . ${HEADAS}/headas-init.sh
103            ;;
104    
105    esac
106    
107  # SAS  # SAS
108    
109  [ ! -f "$HOME/setsas.sh" ] && /sas/bin/confsas  
110  . $HOME/setsas.sh 1> /dev/null  case "$refhost" in
111    
112            # For the time being we force to use SAS 15 given that deceit does not work on SAS 16
113            # For Linux, the installation of SAS is local to CCFLIB_HOME under local/SAS
114            # This installation has been made with perl 5.18.4 as SAS_PERL so we use it.    
115    
116            sasbld01n|sasbld02n|sasbld03n|sasbld04n)
117            
118    
119                    . ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.sh 1> /dev/null
120            ;;
121    
122            xmac01)
123                    . /sasbuild/installed/xmac01/xmmsas_20160201_1833/setsas.sh 1> /dev/null
124            ;;
125            
126            *)
127                    echo "Please use a Linux workstation to process CCF!"
128                    return
129            ;;
130            
131    esac
132    
133  export SAS_MEMORY_MODEL=Low  export SAS_MEMORY_MODEL=Low
134    
135  # Adds some useful perl modules.  # Adds some useful perl modules.
136    #
137    # PERL5LIB includes so far the HEADAS and SAS perl5 subdirs
138    
139  if [ ! -z $PERL5LIB ]; then  if [ ! -z $PERL5LIB ]; then
140    export PERL5LIB=${CCFLIB_HOME}/perl\:$PERL5LIB    export PERL5LIB=${CCFLIB_HOME}/perl:${PERL5LIB}
141  else  else
142    export PERL5LIB=${CCFLIB_HOME}/perl    export PERL5LIB=${CCFLIB_HOME}/perl
143  fi  fi
144    
145  # From CCFDEV/setup.sh  # From CCFDEV/setup.sh
146    
147  export PERL5LIB=${CCFDEV}/lib/perl5:$PERL5LIB  export PERL5LIB=${CCFDEV}/lib/perl5:${PERL5LIB}
148    
149    
150  # Add the scripts in $CCFLIB_HOME/bin to PATH  # Add the scripts in $CCFLIB_HOME/bin and $CCFLIB_HOME/lib (for example uploadccf) to PATH
151    
152  export PATH=${CCFLIB_HOME}/bin\:$PATH  export PATH=${CCFLIB_HOME}/bin:${CCFLIB_HOME}/ccfdev/bin:${CCFLIB_HOME}/ccfdev/lib:${PATH}
153    
154  # Unset MAKE if set  # Unset MAKE if set
155    
# Line 82  fi Line 161  fi
161  # Show it  # Show it
162    
163  echo  echo
164  echo "SAS build reference information"  echo "Heasoft & SAS reference information"
165  echo "==============================="  echo "==================================="
166    echo
167    echo "HEADAS          = $HEADAS"
168    echo "Heasoft version = "`fversion`
169    echo
170  echo  echo
171  sasversion -V 2  sasversion -V 2
172    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.27