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
960e183d
Commit
960e183d
authored
Nov 26, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract ruby-build usage from comments like we do in rbenv
parent
4a6b9280
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
bin/ruby-build
+13
-14
No files found.
bin/ruby-build
View file @
960e183d
#!/usr/bin/env bash
#!/usr/bin/env bash
#
# usage: ruby-build [-kvp] <definition> <prefix>
# ruby-build --definitions
#
# -k/--keep Do not remove source tree after installation
# -v/--verbose Verbose mode: print compilation status to stdout
# -p/--patch Apply a patch from stdin before building
# --definitions List all built-in definitions
#
RUBY_BUILD_VERSION
=
"20141113"
RUBY_BUILD_VERSION
=
"20141113"
...
@@ -954,11 +963,7 @@ version() {
...
@@ -954,11 +963,7 @@ version() {
}
}
usage
()
{
usage
()
{
{
version
sed
-ne
'/^#/!q;s/.\{1,2\}//;1,2d;p'
<
"
$0
"
echo
"usage: ruby-build [-k|--keep] [-v|--verbose] [-p|--patch] definition prefix"
echo
" ruby-build --definitions"
}
>
&1
[
-z
"
$1
"
]
||
exit
"
$1
"
[
-z
"
$1
"
]
||
exit
"
$1
"
}
}
...
@@ -990,15 +995,9 @@ parse_options "$@"
...
@@ -990,15 +995,9 @@ parse_options "$@"
for
option
in
"
${
OPTIONS
[@]
}
"
;
do
for
option
in
"
${
OPTIONS
[@]
}
"
;
do
case
"
$option
"
in
case
"
$option
"
in
"h"
|
"help"
)
"h"
|
"help"
)
usage
version
{
echo
echo
echo
" -k/--keep Do not remove source tree after installation"
usage 0
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
}
>
&1
exit
0
;;
;;
"definitions"
)
"definitions"
)
list_definitions
list_definitions
...
...
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