Add --definitions

This commit is contained in:
Sam Stephenson 2011-08-07 12:38:47 -05:00
parent 23dc3e2c00
commit a568cffd98

View file

@ -121,6 +121,14 @@ usage() {
[ -z "$1" ] && exit 1
}
list_definitions() {
{ for definition in "${RUBY_BUILD_ROOT}/share/ruby-build/"*; do
echo "${definition##*/}"
done
} | sort
}
unset VERBOSE
RUBY_BUILD_ROOT="$(abs_dirname "$0")/.."
@ -132,10 +140,15 @@ case "$1" in
echo "Options:"
echo
echo " -v/--verbose Verbose mode: print compilation status to stdout"
echo " --definitions List all built-in definitions"
echo
} >&2
exit 0
;;
"--definitions" )
list_definitions
exit 0
;;
"-v" | "--verbose" )
VERBOSE=true
shift