mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-25 15:20:38 +02:00
commit
8ebfd1d0a9
5 changed files with 79 additions and 6 deletions
|
|
@ -364,6 +364,8 @@ build_package() {
|
|||
|
||||
echo "Installing ${package_name}..." >&2
|
||||
|
||||
[ -n "$HAS_PATCH" ] && apply_ruby_patch "$package_name"
|
||||
|
||||
for command in $commands; do
|
||||
"build_package_${command}" "$package_name"
|
||||
done
|
||||
|
|
@ -783,13 +785,21 @@ isolated_gem_install() {
|
|||
gem install "$@"
|
||||
}
|
||||
|
||||
apply_ruby_patch() {
|
||||
case "$1" in
|
||||
ruby-* | jruby-* | rubinius-* )
|
||||
patch -p0 -i "${2:--}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
version() {
|
||||
echo "ruby-build ${RUBY_BUILD_VERSION}"
|
||||
}
|
||||
|
||||
usage() {
|
||||
{ version
|
||||
echo "usage: ruby-build [-k|--keep] [-v|--verbose] definition prefix"
|
||||
echo "usage: ruby-build [-k|--keep] [-v|--verbose] [-p|--patch] definition prefix"
|
||||
echo " ruby-build --definitions"
|
||||
} >&2
|
||||
|
||||
|
|
@ -809,6 +819,7 @@ list_definitions() {
|
|||
|
||||
unset VERBOSE
|
||||
unset KEEP_BUILD_PATH
|
||||
unset HAS_PATCH
|
||||
RUBY_BUILD_ROOT="$(abs_dirname "$0")/.."
|
||||
|
||||
parse_options "$@"
|
||||
|
|
@ -820,6 +831,7 @@ for option in "${OPTIONS[@]}"; do
|
|||
{ echo
|
||||
echo " -k/--keep Do not remove source tree after installation"
|
||||
echo " -v/--verbose Verbose mode: print compilation status to stdout"
|
||||
echo " -p/--patch Apply a patch from stdin before building"
|
||||
echo " --definitions List all built-in definitions"
|
||||
echo
|
||||
} >&2
|
||||
|
|
@ -835,6 +847,9 @@ for option in "${OPTIONS[@]}"; do
|
|||
"v" | "verbose" )
|
||||
VERBOSE=true
|
||||
;;
|
||||
"p" | "patch" )
|
||||
HAS_PATCH=true
|
||||
;;
|
||||
"version" )
|
||||
version
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue