Permalink
Browse files

Made progress on IronRuby during coderpath interview.

  • Loading branch information...
1 parent aeea6ee commit eb98b42cc719f4be8c6d82f601d8c21bec5241b9 @wayneeseguin wayneeseguin committed Apr 13, 2010
Showing with 20 additions and 20 deletions.
  1. +2 −2 config/db
  2. +1 −1 config/md5
  3. +5 −5 scripts/manage
  4. +12 −12 scripts/selector
View
@@ -35,6 +35,6 @@ maglev_url=http://glass-downloads.gemstone.com/maglev
maglev_repo_url=git://github.com/MagLev/maglev.git
rubinius_repo_url=git://github.com/evanphx/rubinius.git
shyouhei_repo_url=git://github.com/shyouhei/ruby.git
-ironruby_version=1.0-rc2
+ironruby_version=1.0
ironruby_repo_url=git://github.com/ironruby/ironruby.git
-ironruby_url=http://github.com/ironruby/ironruby/tarball/
+ironruby_1.0_url=http://rubyforge.org/frs/download.php/70179/
View
@@ -64,7 +64,7 @@ zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
pkg-config-0.23.tar.gz=d922a88782b64441d06547632fd85744
rubygems-1.3.6.tgz=789ca8e9ad1d4d3fe5f0534fcc038a0d
-ironruby-ironruby-c912e86.tar.gz=80708c23577ff9bf557f63f0f716fe26
+ironruby-1.0.zip=7a92888837b3507355ed391dbfc0ab83
GemStone-23082.Darwin-i386.tar.gz=aa5f1768e5bad2bb687913c575f9cff6
GemStone-23082.Linux-x86_64.tar.gz=7b7fd0df5d1deacf7aa12ccc9a94a33f
MagLev-23082.Darwin-i386.tar.gz=d9027e7b7c8220573b1d3d588712ffc4
View
@@ -520,19 +520,19 @@ RubyWrapper
if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
else
$rvm_scripts_path/log "info" "Retrieving IronRuby"
+
$rvm_scripts_path/fetch "$rvm_url" "$rvm_ruby_package_file"
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
- __rvm_run "extract" "tar zxf $rvm_archives_path/$rvm_ruby_package_file -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
- result=$? ; if [[ "$result" -gt 0 ]] ; then
+ rm -rf "${rvm_src_path}/${rvm_ruby_string}/"
+ $rvm_scripts_path/log "info" "Extracting $rvm_ruby_package_file ..."
+ unzip -o -d ${rvm_src_path}/${rvm_ruby_string} ${rvm_archives_path}/${rvm_ruby_package_file} >> "$rvm_ruby_log_path/extract.log" 2>> "$rvm_ruby_log_path/extract.error.log"
+ result=$? ; if [[ "$result" -gt 1 ]] ; then
$rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
fi
- rm -rf $rvm_ruby_src_path
- mv $rvm_src_path/$rvm_ruby_package_name $rvm_ruby_src_path
-
#mv $rvm_ruby_home/ironruby/* $rvm_ruby_home
#rm -rf $rvm_ruby_home/ironruby
#mv $rvm_ruby_src_path/$rvm_ruby_package_file/* $rvm_ruby_home
View
@@ -104,20 +104,20 @@ __rvm_select() {
ironruby)
unset rvm_ruby_patch_level
if [[ "$rvm_head_flag" -eq 1 ]] ; then
- export rvm_ruby_version="head"
- export rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
- export rvm_ruby_package_name="${rvm_ruby_string}"
- export rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
- export rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
+ rvm_ruby_version="head"
+ rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
+ rvm_ruby_package_name="${rvm_ruby_string}"
+ rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
+ rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
else
- export rvm_archive_extension="tar.gz"
- export rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
- export rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
- sha1=$(curl -s http://github.com/api/v2/yaml/repos/show/ironruby/ironruby/tags | awk '/'${rvm_ruby_version}'/{print $NF}')
- export rvm_ruby_package_file="ironruby-ironruby-${sha1:0:7}.${rvm_archive_extension}"
- export rvm_ruby_package_name="ironruby-ironruby-${sha1:0:7}"
- export rvm_url="$(__rvm_db "ironruby_url")v${rvm_ruby_version}"
+ rvm_archive_extension="zip"
+ rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
+ rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
+ rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
+ rvm_ruby_package_file="${rvm_ruby_interpreter}-${rvm_ruby_version}.${rvm_archive_extension}"
+ rvm_url="$(__rvm_db "ironruby_${rvm_ruby_version}_url")${rvm_ruby_package_file}"
fi
+ export rvm_ruby_version rvm_ruby_string rvm_ruby_package_name rvm_ruby_repo_url rvm_url rvm_archive_extension
;;
ree)

0 comments on commit eb98b42

Please sign in to comment.