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.10 2017/02/20 14:12:08 ccflib Exp $ |
# $Id: ccf-setup.csh,v 1.12 2017/12/22 11:11:43 ccflib Exp $ |
8 |
|
|
9 |
|
|
10 |
set host=`hostname | cut -d. -f1` |
set host=`hostname | cut -d. -f1` |
20 |
|
|
21 |
switch ($host) |
switch ($host) |
22 |
|
|
23 |
case sasbld0[1,4]n: |
case sasbld0[1-4]n: |
24 |
set refhost=$host |
set refhost=$host |
25 |
setenv CCFLIB_HOME /home/ccflib |
setenv CCFLIB_HOME /home/ccflib |
26 |
breaksw |
breaksw |
51 |
|
|
52 |
if ( ! $?CCFLIB_HOME ) then |
if ( ! $?CCFLIB_HOME ) then |
53 |
echo "Error: Undefined $CCFLIB_HOME - Fix your environment!" |
echo "Error: Undefined $CCFLIB_HOME - Fix your environment!" |
54 |
return |
exit 1 |
55 |
endif |
endif |
56 |
|
|
57 |
# Define where is the CCF development software |
# Define where is the CCF development software |
60 |
|
|
61 |
if ( ! -d $CCFDEV ) then |
if ( ! -d $CCFDEV ) then |
62 |
echo "Error: ccf-setup.csh: $CCFDEV not found! - Abort" |
echo "Error: ccf-setup.csh: $CCFDEV not found! - Abort" |
63 |
return |
exit 1 |
64 |
endif |
endif |
65 |
|
|
66 |
|
|
84 |
setenv HEADAS "/sasbuild/local/${host}/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture" |
setenv HEADAS "/sasbuild/local/${host}/GNU_CC_CXX_4.8.5_Yosemite/headas/architecture" |
85 |
if ( ! -d "$HEADAS" ) then |
if ( ! -d "$HEADAS" ) then |
86 |
echo " ccf-setup.csh: ${HEADAS} does not exist - Abort" |
echo " ccf-setup.csh: ${HEADAS} does not exist - Abort" |
87 |
return |
exit 1 |
88 |
endif |
endif |
89 |
source ${HEADAS}/headas-init.csh |
source ${HEADAS}/headas-init.csh |
90 |
breaksw |
breaksw |
96 |
setenv HEADAS "/sasbuild/local/sasbld02/headas/architecture" |
setenv HEADAS "/sasbuild/local/sasbld02/headas/architecture" |
97 |
if ( ! -d $HEADAS ) then |
if ( ! -d $HEADAS ) then |
98 |
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
99 |
return |
exit 1 |
100 |
endif |
endif |
101 |
source ${HEADAS}/headas-init.csh |
source ${HEADAS}/headas-init.csh |
102 |
breaksw |
breaksw |
105 |
|
|
106 |
# SAS |
# SAS |
107 |
|
|
108 |
switch ($host) |
switch ($refhost) |
109 |
case xvsoc01: |
case xvsoc01: |
110 |
setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031 |
setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031 |
111 |
setenv SAS_PATH ${SAS_DIR} |
setenv SAS_PATH ${SAS_DIR} |
112 |
source $SAS_DIR/sas-setup.csh |
source $SAS_DIR/sas-setup.csh |
113 |
breaksw |
breaksw |
114 |
|
|
115 |
case sasbld0[1-4]: |
case sasbld0[1-4]n: |
116 |
|
|
117 |
source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh 1> /dev/null |
source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh 1> /dev/null |
118 |
|
|
126 |
|
|
127 |
default: |
default: |
128 |
echo "Please use a Linux workstation to process CCF!" |
echo "Please use a Linux workstation to process CCF!" |
129 |
return |
exit 1 |
130 |
breaksw |
breaksw |
131 |
|
|
132 |
endsw |
endsw |
147 |
|
|
148 |
# Add the scripts in $CCFLIB_HOME/bin, $CCFLIB_HOME/lib (for example uploadccf) to PATH |
# Add the scripts in $CCFLIB_HOME/bin, $CCFLIB_HOME/lib (for example uploadccf) to PATH |
149 |
|
|
150 |
setenv PATH ${CCFLIB_HOME}/bin:${CCFLIB_HOME}/lib:${PATH} |
setenv PATH ${CCFLIB_HOME}/bin:${CCFLIB_HOME}/ccfdev/bin:${CCFLIB_HOME}/ccfdev/lib:${PATH} |
151 |
|
|
152 |
# Unsets MAKE if set |
# Unsets MAKE if set |
153 |
|
|