4 |
# |
# |
5 |
# Setup to build CCF from user's home |
# Setup to build CCF from user's home |
6 |
# |
# |
7 |
# $Id$ |
# $Id: ccf-setup.sh,v 1.3 2014/12/11 16:43:54 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 |
|
esac |
22 |
|
|
23 |
# Define CCFLIB_HOME |
# Define CCFLIB_HOME |
24 |
|
|
25 |
case "$USER" in |
case "$host" in |
26 |
ccflib) export CCFLIB_HOME=/home/ccflib ;; |
sasbld01) export CCFLIB_HOME=/home/ccflib ;; |
27 |
*) export CCFLIB_HOME=/ccfbuild ;; |
*) export CCFLIB_HOME=/ccfbuild ;; |
28 |
esac |
esac |
29 |
|
|
30 |
|
# Define where is the CCF development software |
31 |
|
|
32 |
|
export CCFDEV=${CCFLIB_HOME}/ccfdev |
33 |
|
|
34 |
|
if [ ! -d "${CCFDEV}"] ; then |
35 |
|
echo "ccf-setup.sh: ${CCFDEV} not found ! - Abort" |
36 |
|
return |
37 |
|
fi |
38 |
|
|
39 |
|
# Set the CVS access to CCF package repository |
40 |
|
|
41 |
|
export CVSROOT=${CCFLIB_HOME}/ccfcvs |
42 |
|
|
43 |
|
# Heasoft |
44 |
|
|
45 |
|
export HEADAS=/sasbuild/local/${refhost}/headas/architecture |
46 |
|
if [ ! -d "$HEADAS" ] ; then |
47 |
|
echo "ccf-setup.sh: ${HEADAS} does not exist - Abort" |
48 |
|
return |
49 |
|
fi |
50 |
|
. ${HEADAS}/headas-init.sh |
51 |
|
|
52 |
|
# SAS |
53 |
|
|
54 |
|
[ ! -f "$HOME/setsas.sh" ] && /sas/bin/confsas |
55 |
|
. $HOME/setsas.sh |
56 |
|
export SAS_MEMORY_MODEL=Low |
57 |
|
|
58 |
# Adds some useful perl modules. |
# Adds some useful perl modules. |
59 |
|
|
60 |
if [ ! -z $PERL5LIB ]; then |
if [ ! -z $PERL5LIB ]; then |
63 |
export PERL5LIB=${CCFLIB_HOME}/perl |
export PERL5LIB=${CCFLIB_HOME}/perl |
64 |
fi |
fi |
65 |
|
|
66 |
# Initializes the latest SAS installed in /sas |
# From CCFDEV/setup.sh |
67 |
|
|
68 |
[ ! -f "$HOME/setsas.sh" ] && /sas/bin/confsas |
export PERL5LIB=${CCFDEV}/lib/perl5:$PERL5LIB |
|
. $HOME/setsas.sh |
|
|
export SAS_MEMORY_MODEL=Low |
|
69 |
|
|
|
# Shows SAS version and the versions of deceit and ccfextseq |
|
|
sasversion |
|
|
deceit -v |
|
|
ccfextseq -v |
|
70 |
|
|
71 |
# Initialises the CVS environment |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
|
# Users access through the group permissions instead of using CVS_RSH |
|
72 |
|
|
73 |
export CVSROOT=${CCFLIB_HOME}/ccfcvs |
export PATH=${CCFLIB_HOME}/bin\:$PATH |
74 |
|
|
75 |
# Defines CCFDEV and sources some additional setup |
# Unset MAKE if set |
76 |
|
|
77 |
export CCFDEV=${CCFLIB_HOME}/ccfdev |
if [ ! -z "$MAKE" ] ; then |
78 |
. $CCFDEV/setup.sh |
echo "ccf-setup.sh, WARNING: Your environment sets MAKE=$MAKE. It will be unset." |
79 |
|
unset MAKE |
80 |
|
fi |
81 |
|
|
82 |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
# Show it |
83 |
|
|
84 |
export PATH=${CCFLIB_HOME}/bin\:$PATH |
echo |
85 |
|
echo "SAS build reference information" |
86 |
|
echo "===============================" |
87 |
|
echo |
88 |
|
sasversion -V 2 |
89 |
|
|
90 |
|
echo |
91 |
|
echo "CCF building tools" |
92 |
|
echo "==================" |
93 |
|
echo |
94 |
|
deceit -v |
95 |
|
ccfextseq -v |
96 |
|
echo |
97 |
|
echo "CCF development environment" |
98 |
|
echo "===========================" |
99 |
|
echo |
100 |
|
echo "CCFLIB_HOME = $CCFLIB_HOME" |
101 |
|
echo "CCFDEV = $CCFDEV" |
102 |
|
echo "CCF repository = $CVSROOT" |
103 |
|
echo |
104 |
|
echo "*** Ready !" |
105 |
|
echo |