Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install_package() {
extract_package "$package_name"
cd "$package_name"
build_package "$package_name" $*
after_install_package "$package_name"
cd "$cwd"
}

Expand Down Expand Up @@ -65,6 +66,14 @@ build_package_ruby() {
} >$LOG_PATH 2>&1
}

build_package_copy() {
cp -R . "$PREFIX_PATH"
}

after_install_package() {
local stub=1
}

usage() {
echo "usage: ruby-build DEFINITION-PATH INSTALLATION-PREFIX"
exit 1
Expand Down
17 changes: 17 additions & 0 deletions versions/jruby-1.6.3
Original file line number Diff line number Diff line change
@@ -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