Skip to content

Commit a568cff

Browse files
committed
Add --definitions
1 parent 23dc3e2 commit a568cff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bin/ruby-build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ usage() {
121121
[ -z "$1" ] && exit 1
122122
}
123123

124+
list_definitions() {
125+
{ for definition in "${RUBY_BUILD_ROOT}/share/ruby-build/"*; do
126+
echo "${definition##*/}"
127+
done
128+
} | sort
129+
}
130+
131+
124132

125133
unset VERBOSE
126134
RUBY_BUILD_ROOT="$(abs_dirname "$0")/.."
@@ -132,10 +140,15 @@ case "$1" in
132140
echo "Options:"
133141
echo
134142
echo " -v/--verbose Verbose mode: print compilation status to stdout"
143+
echo " --definitions List all built-in definitions"
135144
echo
136145
} >&2
137146
exit 0
138147
;;
148+
"--definitions" )
149+
list_definitions
150+
exit 0
151+
;;
139152
"-v" | "--verbose" )
140153
VERBOSE=true
141154
shift

0 commit comments

Comments
 (0)