summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-03-23 09:45:21 +0100
committerAndreas Maunz <andreas@maunz.de>2012-03-23 09:45:21 +0100
commit410e8e479a591ce298551e200a3d95e4e78cafe5 (patch)
treed58412e97ac830b1a047a91d2b04dd2c73c82fa8
parentbdf70a32e1c711623921f6c5c90868d791b3e591 (diff)
parent910de948361087435d00738982699953a5ee5ca5 (diff)
Merge branch 'modular' of github.com:opentox/install into modular
Conflicts: base-install.sh
-rwxr-xr-xbase-install.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/base-install.sh b/base-install.sh
index fd50176..bbe8f4a 100755
--- a/base-install.sh
+++ b/base-install.sh
@@ -92,9 +92,9 @@ if [ ! -f $JAVA_CONF ]; then
exit 1
fi
- echo "if echo \$JAVA_HOME | grep -v \"$OT_JAVA_HOME\">/dev/null 2>&1; then export JAVA_HOME=\"$OT_JAVA_HOME\"; fi" >> "$JAVA_CONF"
- echo "if echo \$PATH | grep -v \"$OT_JAVA_HOME\">/dev/null 2>&1; then export PATH=\"$OT_JAVA_HOME:\$PATH\"; fi" >> "$JAVA_CONF"
- echo "if ! [ -d \$JAVA_HOME ]; then echo \"\$0: '\$OT_JAVA_HOME' is not a directory!\"; fi" >> "$JAVA_CONF"
+ echo 'if echo "$JAVA_HOME" | grep -v '$OT_JAVA_HOME'>/dev/null 2>&1; then export JAVA_HOME='$OT_JAVA_HOME'; fi' >> "$JAVA_CONF"
+ echo 'if echo "$PATH" | grep -v '$OT_JAVA_HOME/bin'>/dev/null 2>&1; then export PATH='$OT_JAVA_HOME/bin':"$PATH"; fi' >> "$JAVA_CONF"
+ echo 'if ! [ -d "$JAVA_HOME" ]; then echo "$0: JAVA_HOME is not a directory!"; fi' >> "$JAVA_CONF"
echo "Java configuration has been stored in '$JAVA_CONF'."
if ! grep "$JAVA_CONF" $OT_UI_CONF >/dev/null 2>&1; then
@@ -109,8 +109,7 @@ else
fi
if ! grep "rbenv" $OT_UI_CONF >/dev/null 2>&1 ; then
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $OT_UI_CONF
- echo 'eval "$(rbenv init -)"' >> $OT_UI_CONF
+ echo 'if ! echo "$PATH" | grep "$HOME/.rbenv/bin">/dev/null 2>&1; then export PATH="$HOME/.rbenv/bin:$PATH"; eval "$(rbenv init -)"; fi' >> $OT_UI_CONF
fi
cd "$DIR"