1 |
#! /bin/csh |
#! /bin/tcsh |
2 |
# |
# |
3 |
# ccf-setup.csh |
# ccf-setup.csh |
4 |
# |
# |
5 |
# Setup to build CCF from user's home |
# Setup to build CCF from user's home |
6 |
# |
# |
7 |
# $Id: ccf-setup.csh,v 1.6 2014/12/11 16:56:54 ccflib Exp $ |
# $Id: ccf-setup.csh,v 1.8 2014/12/12 14:08:16 ccflib Exp $ |
8 |
|
|
9 |
|
|
10 |
set host=`hostname | cut -d. -f1` |
set host=`hostname | cut -d. -f1` |
24 |
set kernelbits=64 |
set kernelbits=64 |
25 |
set refhost="sasbld02" |
set refhost="sasbld02" |
26 |
breaksw |
breaksw |
27 |
|
case sun4u: |
28 |
|
set kernelbits=32 |
29 |
|
set refhost="xvsoc01" |
30 |
|
breaksw |
31 |
endsw |
endsw |
32 |
|
|
33 |
# Define CCFLIB_HOME |
# Define CCFLIB_HOME |
36 |
case sasbld01: |
case sasbld01: |
37 |
setenv CCFLIB_HOME "/home/ccflib" |
setenv CCFLIB_HOME "/home/ccflib" |
38 |
breaksw |
breaksw |
39 |
|
case xvsoc01: |
40 |
|
setenv CCFLIB_HOME "/data/xmm/ccflib" |
41 |
|
breaksw |
42 |
default : |
default : |
43 |
setenv CCFLIB_HOME "/ccfbuild" |
setenv CCFLIB_HOME "/ccfbuild" |
44 |
breaksw |
breaksw |
48 |
|
|
49 |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
50 |
|
|
51 |
if ( ! -d "${CCFDEV}" ) then |
if ( ! -d $CCFDEV ) then |
52 |
echo "ccf-setup.csh: ${CCFDEV} not found! - Abort" |
echo "ccf-setup.csh: $CCFDEV not found! - Abort" |
53 |
return |
return |
54 |
endif |
endif |
55 |
|
|
56 |
|
|
57 |
# Set the CVS access to CCF package repository |
# Set the CVS access to CCF package repository |
58 |
|
|
59 |
setenv CVSROOT ${CCFLIB_HOME/ccfcvs |
setenv CVSROOT ${CCFLIB_HOME}/ccfcvs |
60 |
|
|
61 |
# Heasoft |
# Heasoft |
62 |
|
switch ($host) |
63 |
setenv HEADAS "/sasbuild/local/${refhost}/headas/architecture" |
case xvsoc01: |
64 |
if ( ! -d "${HEADAS}" ) then |
setenv LHEASOFT=1 |
65 |
echo "ccf-setup.csh: ${HEADAS} does not exist! - Abort" |
breaksw |
66 |
return |
default: |
67 |
endif |
setenv HEADAS "/sasbuild/local/${refhost}/headas/architecture" |
68 |
source ${HEADAS}/headas-init.csh |
if ( ! -d $HEADAS ) then |
69 |
|
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
70 |
|
return |
71 |
|
endif |
72 |
|
source ${HEADAS}/headas-init.csh |
73 |
|
breaksw |
74 |
|
endsw |
75 |
|
|
76 |
# SAS |
# SAS |
77 |
|
|
78 |
if ( ! -f "$HOME/setsas.csh" ) then |
switch ($host) |
79 |
/sas/bin/confsas |
case xvsoc01: |
80 |
endif |
setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031 |
81 |
|
setenv SAS_PATH ${SAS_DIR} |
82 |
source $HOME/setsas.csh |
source $SAS_DIR/sas-setup.csh |
83 |
|
breaksw |
84 |
|
default: |
85 |
|
if ( ! -f "$HOME/setsas.csh" ) then |
86 |
|
/sas/bin/confsas |
87 |
|
endif |
88 |
|
source $HOME/setsas.csh > /dev/null |
89 |
|
breaksw |
90 |
|
endsw |
91 |
|
|
92 |
setenv SAS_MEMORY_MODEL Low |
setenv SAS_MEMORY_MODEL Low |
93 |
|
|