mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
💅 Tidy up ruby-build help output
This commit is contained in:
parent
91c95bbf8f
commit
b80edb1889
3 changed files with 31 additions and 30 deletions
|
@ -2,27 +2,27 @@
|
||||||
#
|
#
|
||||||
# Summary: Install a Ruby version using ruby-build
|
# Summary: Install a Ruby version using ruby-build
|
||||||
#
|
#
|
||||||
# Usage: rbenv install [-f|-s] [-kpv] <version>
|
# Usage: rbenv install [-f|-s] [-kpv] <version> [-- <configure-args...>]
|
||||||
# rbenv install [-f|-s] [-kpv] <definition-file>
|
# rbenv install [-f|-s] [-kpv] <definition-file>
|
||||||
# rbenv install -l|--list
|
# rbenv install --list
|
||||||
# rbenv install --version
|
# rbenv install --version
|
||||||
#
|
#
|
||||||
# -l/--list List latest stable versions for each Ruby
|
# -l, --list List latest stable versions for each Ruby
|
||||||
# -L/--list-all List all local versions
|
# -L, --list-all List all local versions, including outdated ones
|
||||||
# -f/--force Install even if the version appears to be installed already
|
# -f, --force Allow overwriting an existing installed version
|
||||||
# -s/--skip-existing Skip if the version appears to be installed already
|
# -s, --skip-existing Avoid overwriting an existing installed version
|
||||||
#
|
#
|
||||||
# ruby-build options:
|
# ruby-build options:
|
||||||
#
|
#
|
||||||
# -k/--keep Keep source tree in $RBENV_BUILD_ROOT after installation
|
# -v, --verbose Verbose mode: forward all build output to stdout/stderr
|
||||||
# (defaults to $RBENV_ROOT/sources)
|
# -p, --patch Apply a patch from stdin before building
|
||||||
# -p/--patch Apply a patch from stdin before building
|
# -k, --keep Keep source tree in RBENV_BUILD_ROOT after installation
|
||||||
# -v/--verbose Verbose mode: print compilation status to stdout
|
# (defaults to "RBENV_ROOT/sources")
|
||||||
# --version Show version of ruby-build
|
# --version Show version of ruby-build
|
||||||
#
|
#
|
||||||
# For detailed information on installing Ruby versions with
|
# For detailed information on installing Ruby versions with ruby-build,
|
||||||
# ruby-build, including a list of environment variables for adjusting
|
# including a list of environment variables for adjusting compilation,
|
||||||
# compilation, see: https://github.com/rbenv/ruby-build#usage
|
# see: https://github.com/rbenv/ruby-build#usage
|
||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
[ -n "$RBENV_DEBUG" ] && set -x
|
[ -n "$RBENV_DEBUG" ] && set -x
|
||||||
|
@ -100,7 +100,7 @@ for option in "${OPTIONS[@]}"; do
|
||||||
[ ! -t 1 ] || {
|
[ ! -t 1 ] || {
|
||||||
echo
|
echo
|
||||||
echo "Only latest stable releases for each Ruby implementation are shown."
|
echo "Only latest stable releases for each Ruby implementation are shown."
|
||||||
echo "Use 'rbenv install --list-all / -L' to show all local versions."
|
echo "Use \`rbenv install --list-all' to show all local versions."
|
||||||
} 1>&2
|
} 1>&2
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
@ -239,7 +239,7 @@ if [ "$STATUS" == "2" ]; then
|
||||||
echo "$candidates" | indent
|
echo "$candidates" | indent
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "See all available versions with \`rbenv install --list'."
|
echo "See all available versions with \`rbenv install --list-all'."
|
||||||
echo
|
echo
|
||||||
echo -n "If the version you need is missing, try upgrading ruby-build"
|
echo -n "If the version you need is missing, try upgrading ruby-build"
|
||||||
if [ "$here" != "${here#"$(brew --prefix 2>/dev/null)"}" ]; then
|
if [ "$here" != "${here#"$(brew --prefix 2>/dev/null)"}" ]; then
|
||||||
|
@ -247,7 +247,7 @@ if [ "$STATUS" == "2" ]; then
|
||||||
echo " brew upgrade ruby-build"
|
echo " brew upgrade ruby-build"
|
||||||
elif [ -d "${here}/.git" ]; then
|
elif [ -d "${here}/.git" ]; then
|
||||||
printf ":\n\n"
|
printf ":\n\n"
|
||||||
echo " git -C ${here} pull"
|
echo " git -C ${here/${HOME}\//~/} pull"
|
||||||
else
|
else
|
||||||
printf ".\n"
|
printf ".\n"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Usage: ruby-build [-kpv] <definition> <prefix>
|
# Usage: ruby-build [-kpv] <definition> <prefix> [-- <configure-args...>]
|
||||||
# ruby-build --definitions
|
# ruby-build {--list|--definitions}
|
||||||
# ruby-build --version
|
# ruby-build --version
|
||||||
#
|
#
|
||||||
# -k/--keep Do not remove source tree after installation
|
# -l, --list List latest stable releases for each Ruby
|
||||||
# -p/--patch Apply a patch from stdin before building
|
# --definitions List all local definitions, including outdated ones
|
||||||
# -v/--verbose Verbose mode: print compilation status to stdout
|
# --version Show version of ruby-build
|
||||||
# -4/--ipv4 Resolve names to IPv4 addresses only
|
#
|
||||||
# -6/--ipv6 Resolve names to IPv6 addresses only
|
# -v, --verbose Verbose mode: forward all build output to stdout/stderr
|
||||||
# --definitions List all local definitions
|
# -p, --patch Apply a patch from stdin before building
|
||||||
# -l/--list List latest stable releases for each Ruby
|
# -k, --keep Do not remove source tree after installation
|
||||||
# --version Show version of ruby-build
|
# -4, --ipv4 Resolve names to IPv4 addresses only
|
||||||
|
# -6, --ipv6 Resolve names to IPv6 addresses only
|
||||||
#
|
#
|
||||||
|
|
||||||
RUBY_BUILD_VERSION="20231025"
|
RUBY_BUILD_VERSION="20231025"
|
||||||
|
|
|
@ -101,11 +101,11 @@ The following versions contain \`1.9.3' in the name:
|
||||||
1.9.3-p0
|
1.9.3-p0
|
||||||
1.9.3-p194
|
1.9.3-p194
|
||||||
|
|
||||||
See all available versions with \`rbenv install --list'.
|
See all available versions with \`rbenv install --list-all'.
|
||||||
|
|
||||||
If the version you need is missing, try upgrading ruby-build:
|
If the version you need is missing, try upgrading ruby-build:
|
||||||
|
|
||||||
git -C ${BATS_TEST_DIRNAME}/.. pull
|
git -C ${BATS_TEST_DIRNAME/$HOME\//~/}/.. pull
|
||||||
OUT
|
OUT
|
||||||
|
|
||||||
unstub brew
|
unstub brew
|
||||||
|
@ -122,7 +122,7 @@ OUT
|
||||||
assert_output <<OUT
|
assert_output <<OUT
|
||||||
ERROR
|
ERROR
|
||||||
|
|
||||||
See all available versions with \`rbenv install --list'.
|
See all available versions with \`rbenv install --list-all'.
|
||||||
|
|
||||||
If the version you need is missing, try upgrading ruby-build:
|
If the version you need is missing, try upgrading ruby-build:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue