-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdefStone.env
More file actions
47 lines (41 loc) · 1.55 KB
/
defStone.env
File metadata and controls
47 lines (41 loc) · 1.55 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
#=========================================================================
# Copyright (c) 2014, 2015 GemTalk Systems, LLC <[email protected]>.
#
#=========================================================================
if [ "${1}x" = "x" ] ; then
stonePath=$(pwd)
else
stonePath=$GS_HOME/gemstone/stones/$1
fi
path=$stonePath/stone.env
if [ -r $path ]; then
pushd $stonePath >& /dev/null
. $path
popd >& /dev/null
# Compute the length of the $GEMSTONE environment variable
GS_LEN=${#GEMSTONE}
STONE_LEN=${#stonePath}
## Gemstone, Seaside, and stone program paths
# with $stonePath/bin first, you can override any
# gemstone scripts on a stone by stone basis
if [[ ${PATH:0:$STONE_LEN} != ${stonePath} ]] ; then
export PATH=$stonePath/bin:$GEMSTONE/bin:$GEMSTONE/seaside/bin:$PATH
fi
## Gemstone library path
if [[ ${LD_LIBRARY_PATH:0:$GS_LEN} != ${GEMSTONE} ]] ; then
export LD_LIBRARY_PATH=$GEMSTONE/lib:$LD_LIBRARY_PATH
fi
### MacOSX library path is different
if [[ ${DYLD_LIBRARY_PATH:0:$GS_LEN} != ${GEMSTONE} ]] ; then
export DYLD_LIBRARY_PATH=$GEMSTONE/lib:$DYLD_LIBRARY_PATH
fi
## Gemstone manpages
if [[ ${MANPATH:0:$GS_LEN} != $GEMSTONE ]] ; then
export MANPATH=$GEMSTONE/doc:$MANPATH
fi
else
echo 'defStone: WARNING - Your GEMSTONE environment variables have not been set!'
echo "defStone: Missing env file $path"
echo "Make sure you've passed in the stone name as an argument"
echo ' and that $GS_HOME is defined'
fi