From 7b3dc50ce1ec1e5fc82060d4b5d312e6b4209177 Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sat, 24 Sep 2011 23:36:44 -0500 Subject: [PATCH 1/2] Install jruby-launcher after of install JRuby --- share/ruby-build/jruby-1.6.3 | 3 ++- share/ruby-build/jruby-1.6.4 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/ruby-build/jruby-1.6.3 b/share/ruby-build/jruby-1.6.3 index 3e899d29..2341bc15 100644 --- a/share/ruby-build/jruby-1.6.3 +++ b/share/ruby-build/jruby-1.6.3 @@ -5,8 +5,9 @@ after_install_package() { shim_jruby() { cd "${PREFIX_PATH}/bin" - sed -i "" 's/^#!\/bin\/bash/#!\/usr\/bin\/env bash/' jruby ln -fs jruby ruby + { ./ruby gem install jruby-launcher + } >&4 2>&1 } remove_windows_files() { diff --git a/share/ruby-build/jruby-1.6.4 b/share/ruby-build/jruby-1.6.4 index 0a8b937f..bea9094a 100644 --- a/share/ruby-build/jruby-1.6.4 +++ b/share/ruby-build/jruby-1.6.4 @@ -5,8 +5,9 @@ after_install_package() { shim_jruby() { cd "${PREFIX_PATH}/bin" - sed -i "" 's/^#!\/bin\/bash/#!\/usr\/bin\/env bash/' jruby ln -fs jruby ruby + { ./ruby gem install jruby-launcher + } >&4 2>&1 } remove_windows_files() { From 11528d4691dd3be6e571f5876154fc56992fb1ac Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sun, 25 Sep 2011 14:30:52 -0500 Subject: [PATCH 2/2] Add shared build_package_jruby for all JRuby definitions --- bin/ruby-build | 19 +++++++++++++++++++ share/ruby-build/jruby-1.6.3 | 19 +------------------ share/ruby-build/jruby-1.6.4 | 19 +------------------ 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/bin/ruby-build b/bin/ruby-build index f8fc0c4b..9e766c80 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -147,6 +147,25 @@ build_package_rbx() { } >&4 2>&1 } +build_package_jruby() { + build_package_copy + cd "${PREFIX_PATH}/bin" + ln -fs jruby ruby + install_jruby_launcher + remove_windows_files +} + +install_jruby_launcher() { + cd "${PREFIX_PATH}/bin" + { ./ruby gem install jruby-launcher + } >&4 2>&1 +} + +remove_windows_files() { + cd "$PREFIX_PATH" + rm -f bin/*.exe bin/*.dll bin/*.bat bin/jruby.sh +} + build_package_copy() { cp -R . "$PREFIX_PATH" } diff --git a/share/ruby-build/jruby-1.6.3 b/share/ruby-build/jruby-1.6.3 index 2341bc15..b2ebdabb 100644 --- a/share/ruby-build/jruby-1.6.3 +++ b/share/ruby-build/jruby-1.6.3 @@ -1,19 +1,2 @@ -after_install_package() { - shim_jruby - remove_windows_files -} - -shim_jruby() { - cd "${PREFIX_PATH}/bin" - ln -fs jruby ruby - { ./ruby gem install jruby-launcher - } >&4 2>&1 -} - -remove_windows_files() { - cd "$PREFIX_PATH" - rm -f bin/*.exe bin/*.dll bin/*.bat bin/jruby.sh -} - -install_package "jruby-1.6.3" "http://jruby.org.s3.amazonaws.com/downloads/1.6.3/jruby-bin-1.6.3.tar.gz" copy +install_package "jruby-1.6.3" "http://jruby.org.s3.amazonaws.com/downloads/1.6.3/jruby-bin-1.6.3.tar.gz" jruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby diff --git a/share/ruby-build/jruby-1.6.4 b/share/ruby-build/jruby-1.6.4 index bea9094a..a8c44bd7 100644 --- a/share/ruby-build/jruby-1.6.4 +++ b/share/ruby-build/jruby-1.6.4 @@ -1,19 +1,2 @@ -after_install_package() { - shim_jruby - remove_windows_files -} - -shim_jruby() { - cd "${PREFIX_PATH}/bin" - ln -fs jruby ruby - { ./ruby gem install jruby-launcher - } >&4 2>&1 -} - -remove_windows_files() { - cd "$PREFIX_PATH" - rm -f bin/*.exe bin/*.dll bin/*.bat bin/jruby.sh -} - -install_package "jruby-1.6.4" "http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-bin-1.6.4.tar.gz" copy +install_package "jruby-1.6.4" "http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-bin-1.6.4.tar.gz" jruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby