-
Notifications
You must be signed in to change notification settings - Fork 7
/
.setup
executable file
·105 lines (87 loc) · 3.49 KB
/
.setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/csh
#
# File: .setup
#
# EPICS Environment
#
set sourced=($_)
# If $CLAS is set from .cshrc or by sourcing top-level .setup, use it.
# Otherwise, define $EPICS relative to this .setup file. $curdir is
# used so this file can be sourced from anywhere and still work.
if ($?CLAS) then
setenv EPICS $CLAS/epics
else
set curdir=`/usr/bin/readlink -f $sourced[2]`
set curdir=`/usr/bin/dirname $curdir`
setenv EPICS $curdir
endif
## Overrides for RHEL5/6, only solves base (ex. caget, caput, etc)
set REDHATFILE = /etc/redhat-release
if ( -e $REDHATFILE ) then
set rhel_vers = `awk '{print substr($7,0,1)}' /etc/redhat-release`
set cent_vers = `awk '{print substr($3,0,1)}' /etc/redhat-release`
if ( $rhel_vers == "5" ) then
setenv EPICS_VER R3.14.12.3
set RHEL_VER = "_RHEL5"
else if ( $cent_vers == "5" ) then
setenv EPICS_VER R3.14.12.3
set RHEL_VER = "_RHEL5"
else if ( $rhel_vers == "6" ) then
setenv EPICS_VER R3.14.12.5
set RHEL_VER = "_RHEL6"
else
setenv EPICS_VER R3.14.12.5
set RHEL_VER = ""
endif
else
setenv EPICS_VER R3.14.12.5
set RHEL_VER = ""
endif
setenv EPICS_BASE /usr/clas12/${EPICS_VER}/base$RHEL_VER
setenv EPICS_EXTENSIONS /usr/clas12/${EPICS_VER}/extensions$RHEL_VER
# sergey: added /usr/local/share/snmp/mibs, it exist on VME controllers and /usr/share/snmp/mibs exist on RHELs
setenv MIBDIRS /usr/clas12/$EPICS_VER/modules/snmp-nscl-1-0-RC9/mibs:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs
setenv MIBS ALL
# set EPICS host architecture
setenv OSTYPE `uname`
setenv MACHINE `uname -m`
if ( ($OSTYPE == "Linux") && ($MACHINE == "i686" || $MACHINE == "x86") ) then
setenv EPICS_HOST_ARCH linux-x86
else
setenv EPICS_HOST_ARCH linux-x86_64
endif
## caget/caput/etc, medm/striptool/etc...
set -f path=("${EPICS_BASE}/bin/${EPICS_HOST_ARCH}" $path:q)
set -f path=("${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}" $path:q)
## EPICS tools and utils
set -f path=("$EPICS/bin" $path:q)
## CSS, alarm tools, etc
set -f path=("/usr/clas12/css/pro/${EPICS_HOST_ARCH}/bin" $path:q)
## acctools rsync'd from Cebaf (MyaViewer, etc)
set -f path=("/usr/csite/certified/bin" $path:q)
if ( ! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}:/usr/clas12/third-party-libs/net-snmp-5.8.dev/x86_64/lib"
setenv EPICS_CA_AUTO_ADDR_LIST no
setenv EPICS_CA_ADDR_LIST "129.57.255.12 129.57.255.6 129.57.163.255 129.57.231.255"
## Pezca
if ( ! $?PERL5LIB ) setenv PERL5LIB
setenv PERL5LIB "${PERL5LIB}:/usr/clas12/third-party-libs/Pezca-1.3/lib/perl5/x86_64-linux-thread-multi"
set script_dir="${EPICS}/apps/scripts"
set css_script_dir="${EPICS}/css_share/common/scripts"
set -f path=("${script_dir}" $path:q)
if ( ! $?ROOTSYS ) then
setenv ROOTSYS /apps/root/5.34.21
set -f path=("$ROOTSYS/bin" $path:q)
if ( ! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH":"$ROOTSYS/lib"
endif
if ( ! $?PYTHONPATH ) setenv PYTHONPATH
setenv PYTHONPATH "${PYTHONPATH}:${script_dir}:${css_script_dir}:/usr/clas12/third-party-libs/pyepics-RHEL7"
setenv PYTHONPATH "${PYTHONPATH}:${ROOTSYS}/lib"
setenv EPICS_SCRIPTS "${script_dir}"
# This sometimes hangs and can NOT be in the .setup (do it in the repeer executable instead):
#source ${EPICS}/tools/reeper/thisreeper.csh
## CS-Studio
setenv DIIRT_HOME ${EPICS}/css_share/common/prefs/diirt
# RHEL7.4 gtk3 patches break eclipse/css, new css versions unaffected.
setenv SWT_GTK3 0