diff --git a/bin/ruby-build b/bin/ruby-build index c6064f15..43f06758 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -13,6 +13,7 @@ install_package() { extract_package "$package_name" cd "$package_name" build_package "$package_name" $* + after_install_package "$package_name" cd "$cwd" } @@ -65,11 +66,19 @@ build_package_ruby() { } >$LOG_PATH 2>&1 } +build_package_copy() { + cp -R . "$PREFIX_PATH" +} + build_package_ree_installer() { { ./installer --auto "$PREFIX_PATH" } >$LOG_PATH 2>&1 } +after_install_package() { + local stub=1 +} + usage() { echo "usage: ruby-build DEFINITION-PATH INSTALLATION-PREFIX" exit 1 diff --git a/versions/jruby-1.6.3 b/versions/jruby-1.6.3 new file mode 100644 index 00000000..27e742c8 --- /dev/null +++ b/versions/jruby-1.6.3 @@ -0,0 +1,17 @@ +after_install_package() { + shim_jruby + remove_windows_files +} + +shim_jruby() { + cd "${PREFIX_PATH}/bin" + sed -i "" 's/^#!\/bin\/bash/#!\/usr\/bin\/env bash/' jruby + ln -fs jruby ruby +} + +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