-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsimput-install.csh
More file actions
54 lines (46 loc) · 1.34 KB
/
simput-install.csh
File metadata and controls
54 lines (46 loc) · 1.34 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
#!/bin/csh -v
# install for SIMPUT - csh version
#
# This script assumes that the SIMPUT environment variable is set
# and uses nifty tricks from HEADAS' setup scripts
#
# Author: Joern Wilms, joern.wilms@sternwarte.uni-erlangen.de
#
if (${?SIMPUT} == 0) then
echo "simput-install.csh: ERROR -- set SIMPUT before sourcing simput-install.csh"
exit 1
endif
if (! -d ${SIMPUT}) then
echo "Directory ${SIMPUT} does not exist"
exit 2
endif
set SIMPUT_BIN = ${SIMPUT}/bin
setenv PATH ${SIMPUT_BIN}:${PATH}
#
# setup parameter files
#
if (${?PFILES} == 0) then
mkdir -p ${HOME}/pfiles
setenv PFILES "${HOME}/pfiles;${SIMPUT}/share/simput/pfiles"
else
setenv PFILES "${PFILES}:${SIMPUT}/share/simput/pfiles"
endif
#
# set LD_LIBRARY_PATH
#
set SIMPUT_LIB = ${SIMPUT}/lib
if (${?LD_LIBRARY_PATH} == 0) then
setenv LD_LIBRARY_PATH ${SIMPUT_LIB}
else
setenv LD_LIBRARY_PATH `echo ":${LD_LIBRARY_PATH}:" | sed "s%:${SIMPUT_LIB}:%:%g" | sed 's%::*$%%'`
setenv LD_LIBRARY_PATH ${SIMPUT_LIB}${LD_LIBRARY_PATH}
endif
set build_os = `uname`
if (${build_os} == "Darwin") then
if (${?DYLD_LIBRARY_PATH} == 0) then
setenv DYLD_LIBRARY_PATH ${SIMPUT_LIB}
else
setenv DYLD_LIBRARY_PATH `echo ":${DYLD_LIBRARY_PATH}:" | sed "s%:${SIMPUT_LIB}:%:%g" | sed 's%::*$%%'`
setenv DYLD_LIBRARY_PATH ${SIMPUT_LIB}${DYLD_LIBRARY_PATH}
endif
endif