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

Diff of /ccf-setup.sh

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

revision 1.2 by ccflib, Wed Dec 10 10:58:21 2014 UTC revision 1.6 by ccflib, Fri Mar 18 15:59:17 2016 UTC
# Line 4  Line 4 
4  #  #
5  # Setup to build CCF from user's home  # Setup to build CCF from user's home
6  #  #
7  # $Id: ccf-setup.sh,v 1.1 2014/12/10 09:54:51 ccflib Exp $  # $Id: ccf-setup.sh,v 1.5 2014/12/12 13:49:27 ccflib Exp $
8    
9    
10    host=`hostname | cut -d. -f1`
11    
12    # Identify machine OS name and kernel type
13    
14    osname=`uname -s`
15    
16    cputype=`uname -m`
17    
18    case "$cputype" in
19      i[3,4,5,6]86) kernelbits=32 ; refhost="sasbld01" ;;
20      x86_64)       kernelbits=64 ; refhost="sasbld02" ;;
21      sunu4u)       kernelbits=32 ; refhost="xvsoc01"  ;;
22    esac
23    
24  # Define CCFLIB_HOME  # Define CCFLIB_HOME
25    
26  case "$USER" in  case "$host" in
27     ccflib) export CCFLIB_HOME=/home/ccflib ;;     sasbld01) export CCFLIB_HOME=/home/ccflib     ;;
28     *)      export CCFLIB_HOME=/ccfbuild    ;;     xvsoc01)  export CCFLIB_HOME=/data/xmm/ccflib ;;
29       *)        export CCFLIB_HOME=/ccfbuild        ;;
30    esac
31    
32    # Define where is the CCF development software
33    
34    export CCFDEV=${CCFLIB_HOME}/ccfdev
35    
36    if [ ! -d "${CCFDEV}" ] ; then
37       echo "ccf-setup.sh: ${CCFDEV} not found ! - Abort"
38       return
39    fi
40    
41    # Set the CVS access to CCF package repository
42    
43    export CVSROOT=${CCFLIB_HOME}/ccfcvs
44    
45    # Heasoft
46    
47    case "$host" in
48      xvsoc01)  export LHEASOFT=1 ;;
49      sasdmz01) export HEADAS=/sasbuild/local/sasdmz01/headas/architecture
50                if [ ! -d "$HEADAS" ] ; then
51                   echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
52                   return
53                fi
54                . ${HEADAS}/headas-init.sh  ;;
55      sasdmz02) export HEADAS=/sasbuild/local/sasdmz02/headas/architecture
56                if [ ! -d "$HEADAS" ] ; then
57                   echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
58                   return
59                fi
60                . ${HEADAS}/headas-init.sh  ;;
61      *)        export HEADAS=/sasbuild/local/${refhost}/headas/architecture
62                if [ ! -d "$HEADAS" ] ; then
63                   echo "ccf-setup.sh: ${HEADAS} does not exist - Abort"
64                   return
65                fi
66                . ${HEADAS}/headas-init.sh  ;;
67     esac
68    
69    # SAS
70    
71    case "$host" in
72      xvsoc01) export SAS_DIR=${CCFLIB_HOME}/xmmsas_20020413_2031
73               export SAS_PATH=$SAS_DIR
74               . $SAS_DIR/sas-setup.sh     ;;
75      *)       [ ! -f "$HOME/setsas.sh" ] && /sas/bin/confsas
76               . $HOME/setsas.sh 1> /dev/null  ;;
77  esac  esac
78    
79    export SAS_MEMORY_MODEL=Low
80    
81  # Adds some useful perl modules.  # Adds some useful perl modules.
82    
83  if [ ! -z $PERL5LIB ]; then  if [ ! -z $PERL5LIB ]; then
# Line 21  else Line 86  else
86    export PERL5LIB=${CCFLIB_HOME}/perl    export PERL5LIB=${CCFLIB_HOME}/perl
87  fi  fi
88    
89  # Initializes the latest SAS installed in /sas  # From CCFDEV/setup.sh
90    
91  [ ! -f "$HOME/setsas.sh" ] && /sas/bin/confsas  export PERL5LIB=${CCFDEV}/lib/perl5:$PERL5LIB
 export LHEASOFT=1  
 . $HOME/setsas.sh  
 export SAS_MEMORY_MODEL=Low  
92    
 # Shows SAS version and the versions of deceit and ccfextseq  
 sasversion  
 deceit -v  
 ccfextseq -v  
93    
94  # Initialises the CVS environment  # Add the scripts in $CCFLIB_HOME/bin to PATH
 # Users access through the group permissions instead of using CVS_RSH  
95    
96  export CVSROOT=${CCFLIB_HOME}/ccfcvs  export PATH=${CCFLIB_HOME}/bin\:$PATH
97    
98  # Defines CCFDEV and sources some additional setup  # Unset MAKE if set
99    
100  export CCFDEV=${CCFLIB_HOME}/ccfdev  if [ ! -z "$MAKE" ] ; then
101  . $CCFDEV/setup.sh     echo "ccf-setup.sh, WARNING: Your environment sets MAKE=$MAKE. It will be unset."
102       unset MAKE
103    fi
104    
105  # Add the scripts in $CCFLIB_HOME/bin to PATH  # Show it
106    
107  export PATH=${CCFLIB_HOME}/bin\:$PATH  echo
108    echo "SAS build reference information"
109    echo "==============================="
110    echo
111    sasversion -V 2
112    
113    echo
114    echo "CCF building tools"
115    echo "=================="
116    echo
117    deceit -v
118    ccfextseq -v
119    echo
120    echo "CCF development environment"
121    echo "==========================="
122    echo
123    echo "CCFLIB_HOME     = $CCFLIB_HOME"
124    echo "CCFDEV          = $CCFDEV"
125    echo "CCF repository  = $CVSROOT"
126    echo
127    echo "*** Ready !"
128    echo

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.27