-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathsetup_runtime.csh.in
More file actions
executable file
·98 lines (81 loc) · 2.49 KB
/
setup_runtime.csh.in
File metadata and controls
executable file
·98 lines (81 loc) · 2.49 KB
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
# Main install prefix set by user or post install script:
# UVCDAT_INSTALL_PREFIX
setenv UVCDAT_PROMPT_STRING @UVCDAT_PROMPT_STRING@
if ( $?UVCDAT_PROMPT_BEGINNING ) then
set prompt = "[@UVCDAT_PROMPT_STRING@]${prompt}"
endif
if ( $?UVCDAT_PROMPT_END ) then
set prompt = "${prompt}[@UVCDAT_PROMPT_STRING@]"
endif
# If unset, use the value configured by cmake by default.
# Everything beyond this point will be determined relatively
# from this path.
if ( $?UVCDAT_INSTALL_PREFIX ) then
set install_prefix=${UVCDAT_INSTALL_PREFIX}
else
set install_prefix=@CMAKE_INSTALL_PREFIX@
endif
# Try to prevent the user from sourcing twice,
# which can lead to errors.
if ( $?UVCDAT_SETUP_PATH ) then
if ( ${UVCDAT_SETUP_PATH} == ${install_prefix} ) then
echo 'Nothing to do since UVCDAT is already setup at '${UVCDAT_SETUP_PATH}
exit 0
else
echo 'INFO: UVCDAT setup was previously sourced at '${UVCDAT_SETUP_PATH}
echo 'INFO: There is no need to run setup_runtime manually anymore.'
echo 'INFO: Open a new shell in order to use a different install location.'
exit 0
endif
endif
# Check that the install prefix exists, otherwise stop.
if ( ! -d ${install_prefix} ) then
echo 'ERROR: '${install_prefix}' is not a directory.'
exit 1
endif
if ( ! $?LD_LIBRARY_PATH ) then
setenv LD_LIBRARY_PATH ''
endif
if ( ! $?PYTHONPATH ) then
setenv PYTHONPATH ''
endif
if ( ! $?PATH ) then
setenv PATH ''
endif
if ( '@QT_LIB_DIR@' != '' ) then
if ( -d @QT_LIB_DIR@ ) then
setenv LD_LIBRARY_PATH @QT_LIB_DIR@:${LD_LIBRARY_PATH}
endif
endif
foreach d ( @SETUP_LIBRARY_PATHS@ )
set f=${install_prefix}/${d}
if ( -d ${f} ) then
setenv LD_LIBRARY_PATH ${f}:${LD_LIBRARY_PATH}
endif
end
if ( `uname` == 'Darwin' ) then
setenv DYLD_FALLBACK_LIBRARY_PATH ${LD_LIBRARY_PATH}
endif
foreach d ( @SETUP_PYTHON_PATHS@ )
set f=${install_prefix}/${d}
if ( -d ${f} ) then
setenv PYTHONPATH ${f}:${PYTHONPATH}
endif
end
foreach d ( @SETUP_EXECUTABLE_PATHS@ )
set f=${install_prefix}/${d}
if ( -d ${f} ) then
setenv PATH ${f}:${PATH}
endif
end
if ( -d ${install_prefix}/Externals/lib/R ) then
setenv R_HOME ${install_prefix}/Externals/lib/R
endif
setenv OPAL_PREFIX ${install_prefix}/Externals
setenv LIBOVERLAY_SCROLLBAR 0
setenv UVCDAT_SETUP_PATH ${install_prefix}
unset install_prefix
echo 'Successfully updated your environment to use UVCDAT'
echo '(changes are valid for this session/terminal only)'
echo 'Version: '${UVCDAT_PROMPT_STRING}
echo 'Location: '${UVCDAT_SETUP_PATH}