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

Diff of /ccf-setup.csh

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

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

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

  ViewVC Help
Powered by ViewVC 1.1.27