scripts/manage in rvm-0.1.0 vs scripts/manage in rvm-0.1.1
- old
+ new
@@ -338,11 +338,11 @@
jruby)
if ! which java &> /dev/null ; then
echo -e "java must be installed and in your path in order to install JRuby." ; return 1
fi
- mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
+ mkdir -p "$rvm_ruby_log_path"
__rvm_pushpop $rvm_src_path
__rvm_fetch_ruby
result=$? ; if [[ "$result" -gt 0 ]] ; then
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
fi
@@ -382,13 +382,13 @@
maglev)
export rvm_install_on_use_flag=1 ; $rvm_bin_path/rvm 1.8.7 --install # This should install if missing.
$rvm_scripts_path/log "info" "Running MagLev prereqs checking script."
$rvm_scripts_path/maglev
- result=$? ; if [[ "$result" -gt 0 ]] ; then
- $rvm_scripts_path/log "error" "Prerequisite checks have failed. Aborting the installation." ; __rvm_pushpop ; return $result
- fi
+ result=$? ; if [[ "$result" -gt 0 ]] ; then
+ $rvm_scripts_path/log "error" "Prerequisite checks have failed. Aborting the installation." ; __rvm_pushpop ; return $result
+ fi
mkdir -p "$rvm_ruby_log_path"
__rvm_pushpop $rvm_src_path
if [[ ! -d "$rvm_src_path/$rvm_ruby_string" ]] || [[ ! -z "$rvm_force_flag" ]] ; then
@@ -397,19 +397,27 @@
result=$? ; if [[ "$result" -gt 0 ]] ; then
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
fi
fi
+ if [[ ! -z "$rvm_head_flag" ]] ; then
+ cd $rvm_ruby_src_path
+ rvm_gemstone_package_file="GemStone-$(grep ^GEMSTONE version.txt | cut -f2 -d-).$(uname -sm | tr ' ' '-')"
+ rvm_gemstone_url="${rvm_gemstone_url:-"$maglev_url/${rvm_gemstone_package_file}.${rvm_archive_extension}"}"
+ fi
+
$rvm_scripts_path/log "info" "Downloading the gemstone package, this may take a while depending on your connection..."
$rvm_scripts_path/fetch "$rvm_gemstone_url"
result=$? ; if [[ "$result" -gt 0 ]] ; then
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the gemstone package. Aborting the installation." ; __rvm_pushpop ; return $result
fi
builtin cd "$rvm_src_path"
- mv "$rvm_ruby_package_file" "$rvm_ruby_string"
+ if [[ -s "$rvm_ruby_package_file" ]] ; then
+ mv "$rvm_ruby_package_file" "$rvm_ruby_src_path"
+ fi
builtin cd "$rvm_ruby_src_path"
__rvm_run "gemstone.extract" "cat $rvm_archives_path/${rvm_gemstone_package_file}.${rvm_archive_extension} | gunzip | tar xf - -C $rvm_ruby_src_path"
result=$? ; if [[ "$result" -gt 0 ]] ; then
@@ -434,9 +442,14 @@
for binary in maglev-ruby maglev-irb maglev-gem ; do
__rvm_inject_gem_env $rvm_ruby_home/bin/$binary
done ; unset binary
builtin cd "$rvm_ruby_home"
+ if [[ ! -z "$rvm_head_flag" ]] ; then
+ git submodule update --init
+ $rvm_ruby_home/bin/maglev force-reload
+ ln -sf maglev.demo.key-$(uname -sm | tr ' ' '-') etc/maglev.demo.key
+ fi
#ln -fs "$rvm_ruby_home/$(echo $rvm_gemstone_package_file | awk -F'.' '{print $1}')" "$rvm_ruby_home/gemstone"
if [[ ! -e ${rvm_ruby_home}/etc/conf.d/maglev.conf ]] ; then
$rvm_scripts_path/log "info" "Creating default 'maglev' repository." ; __rvm_pushpop ; return $result