Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move maglev start to a hook for easier maintenaance

  • Loading branch information...
commit 920d5a26ada712df02d01cbaf11506c703372d4d 1 parent 125ceae
@mpapis mpapis authored
View
9 hooks/after_use_maglev
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+. "${rvm_path}/scripts/functions/hooks/maglev"
+
+if
+ [[ "${rvm_ruby_string}" =~ "maglev" ]]
+then
+ _maglev_gemstone start
+fi
View
23 scripts/functions/hooks/maglev
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+
+_maglev_gemstone()
+{
+ case "$1" in
+ start)
+ export MAGLEV_HOME="$rvm_ruby_home"
+ export GEMSTONE_GLOBAL_DIR=$MAGLEV_HOME
+ if
+ [[ -x "$MAGLEV_HOME/gemstone/bin/gslist" ]]
+ then
+ if
+ "$MAGLEV_HOME/gemstone/bin/gslist" -clv > /dev/null 2>&1
+ then
+ true # it's running already
+ else
+ "$rvm_ruby_home/bin/maglev" start
+ fi
+ fi
+ ;;
+ esac
+}
View
15 scripts/selector
@@ -598,21 +598,6 @@ __rvm_use()
rvm_alias_expanded=1 "$rvm_scripts_path/alias" create "$rvm_ruby_alias" "$environment_id" > /dev/null 2>&1
ruby_alias="" ; rvm_ruby_alias=""
fi
-
- if [[ "maglev" == "${rvm_ruby_interpreter:-""}" ]]
- then
- export MAGLEV_HOME="$rvm_ruby_home"
- export GEMSTONE_GLOBAL_DIR=$MAGLEV_HOME
-
- if [[ -x "$MAGLEV_HOME/gemstone/bin/gslist" ]]
- then
- "$MAGLEV_HOME/gemstone/bin/gslist" -clv > /dev/null 2>&1 ; result=$?
- if (( result == 1 ))
- then
- "$rvm_ruby_home/bin/maglev" start
- fi
- fi
- fi
else
if (( ${rvm_default_flag:=0} == 1 ))
then
Please sign in to comment.
Something went wrong with that request. Please try again.