Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
386b3761
Commit
386b3761
authored
Mar 21, 2013
by
Sam Stephenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`rbenv install 1.9.3` lists matching definitions
parent
28bdf54e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
bin/rbenv-install
+28
-3
bin/ruby-build
+1
-1
No files found.
bin/rbenv-install
View file @
386b3761
...
...
@@ -37,6 +37,15 @@ usage() {
[
-z
"
$1
"
]
||
exit
"
$1
"
}
definitions
()
{
local
query
=
"
$1
"
ruby-build
--definitions
|
grep
-F
"
$query
"
||
true
}
indent
()
{
sed
's/^/ /'
}
unset
FORCE
unset
KEEP
unset
VERBOSE
...
...
@@ -49,7 +58,7 @@ for option in "${OPTIONS[@]}"; do
;;
"l"
|
"list"
)
echo
"Available versions:"
ruby-build
--definitions
| sed
's/^/ /'
definitions | indent
exit
;;
"f"
|
"force"
)
...
...
@@ -144,11 +153,27 @@ cleanup() {
trap
cleanup SIGINT
# Invoke `ruby-build` and record the exit status in $STATUS. Run
# `rbenv rehash` after a successful installation.
# Invoke `ruby-build` and record the exit status in $STATUS.
STATUS
=
0
ruby-build
$KEEP
$VERBOSE
"
$DEFINITION
"
"
$PREFIX
"
||
STATUS
=
"
$?
"
# Display a more helpful message if the definition wasn't found.
if
[
"
$STATUS
"
==
"2"
]
;
then
{
candidates
=
"
$(
definitions
"
$DEFINITION
"
)
"
if
[
-n
"
$candidates
"
]
;
then
echo
echo
"The following versions contain
\`
$DEFINITION
' in the name:"
echo
"
$candidates
"
| indent
fi
echo
echo
"You can list all available versions with
\`
rbenv install --list'."
echo
echo
"If the version you're looking for is not present, first try upgrading"
echo
"ruby-build. If it's still missing, open a request on the ruby-build"
echo
"issue tracker: https://github.com/sstephenson/ruby-build/issues"
}
>
&2
fi
# Execute `after_install` hooks.
for
hook
in
"
${
after_hooks
[@]
}
"
;
do
eval
"
$hook
"
;
done
...
...
bin/ruby-build
View file @
386b3761
...
...
@@ -641,7 +641,7 @@ elif [ ! -e "$DEFINITION_PATH" ]; then
DEFINITION_PATH
=
"
$BUILTIN_DEFINITION_PATH
"
else
echo
"ruby-build: definition not found:
${
DEFINITION_PATH
}
"
>
&2
exit
1
exit
2
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment