-
Notifications
You must be signed in to change notification settings - Fork 2
/
MDSCTK.bash.in
86 lines (78 loc) · 2.46 KB
/
MDSCTK.bash.in
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
##
##
## This source code is part of
##
## M D S C T K
##
## Molecular Dynamics Spectral Clustering ToolKit
##
## VERSION 1.2.5
## Written by Joshua L. Phillips.
## Copyright (c) 2012-2016, Joshua L. Phillips.
## Check out http://www.cs.mtsu.edu/~jphillips/software.html for more
## information.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## If you want to redistribute modifications, please consider that
## derived work must not be called official MDSCTK. Details are found
## in the README & LICENSE files - if they are missing, get the
## official version at github.com/jlphillipsphd/mdsctk/.
##
## To help us fund MDSCTK development, we humbly ask that you cite
## the papers on the package - you can find them in the top README file.
##
## For more info, check our website at
## http://www.cs.mtsu.edu/~jphillips/software.html
##
##
# remove old PATH
tmppath=""
for i in `echo $PATH | sed "s/:/ /g"`; do
if test "$i" != "$MDSCTK_HOME"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
PATH=$tmppath
# remove old LD_LIBRARY_PATH
tmppath=""
for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
if test "$i" != "$MDSCTK_HOME/lib"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
LD_LIBRARY_PATH=$tmppath
# remove old PKG_CONFIG_PATH
tmppath=""
for i in `echo $PKG_CONFIG_PATH | sed "s/:/ /g"`; do
if test "$i" != "$MDSCTK_HOME/lib/pkgconfig"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
PKG_CONFIG_PATH=$tmppath
# remove old MANPATH
tmppath=""
for i in `echo $MANPATH | sed "s/:/ /g"`; do
if test "$i" != "$MDSCTK_HOME/man"; then
tmppath="${tmppath}${tmppath:+:}${i}"
fi
done
MANPATH=$tmppath
## Configure
MDSCTK_HOME="@CMAKE_CURRENT_SOURCE_DIR@"
PATH=${MDSCTK_HOME}${PATH:+:}${PATH}
LD_LIBRARY_PATH=${MDSCTK_HOME}/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
PKG_CONFIG_PATH=${MDSCTK_HOME}/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}
MANPATH=${MDSCTK_HOME}/man:${MANPATH}
export MDSCTK_HOME LD_LIBRARY_PATH PATH MANPATH PKG_CONFIG_PATH
## Extended globbing... future work
if (complete) > /dev/null 2>&1; then
if (shopt -s extglob) > /dev/null 2>&1; then
if [ -f ${MDSCTK_HOME}/completion.bash ]; then
source ${MDSCTK_HOME}/completion.bash;
fi
fi
fi