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

Contents of /ccf-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations)
Fri Mar 18 15:59:17 2016 UTC (8 years, 8 months ago) by ccflib
Branch: MAIN
Changes since 1.5: +34 -11 lines
File MIME type: application/x-sh
Adapted to work on DMZ with /ccfbuild provided by xvsoc01

1 #!/bin/bash
2 #
3 # ccf-setup.sh
4 #
5 # Setup to build CCF from user's home
6 #
7 # $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
25
26 case "$host" in
27 sasbld01) export CCFLIB_HOME=/home/ccflib ;;
28 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
78
79 export SAS_MEMORY_MODEL=Low
80
81 # Adds some useful perl modules.
82
83 if [ ! -z $PERL5LIB ]; then
84 export PERL5LIB=${CCFLIB_HOME}/perl\:$PERL5LIB
85 else
86 export PERL5LIB=${CCFLIB_HOME}/perl
87 fi
88
89 # From CCFDEV/setup.sh
90
91 export PERL5LIB=${CCFDEV}/lib/perl5:$PERL5LIB
92
93
94 # Add the scripts in $CCFLIB_HOME/bin to PATH
95
96 export PATH=${CCFLIB_HOME}/bin\:$PATH
97
98 # Unset MAKE if set
99
100 if [ ! -z "$MAKE" ] ; then
101 echo "ccf-setup.sh, WARNING: Your environment sets MAKE=$MAKE. It will be unset."
102 unset MAKE
103 fi
104
105 # Show it
106
107 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

  ViewVC Help
Powered by ViewVC 1.1.27