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
1fb955ee
Commit
1fb955ee
authored
Mar 24, 2013
by
Erik Michaels-Ober
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #326 from quark-zju/keep-downloaded-tarball
Keep downloaded tarball sometimes
parents
386b3761
3d2f1a72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
bin/ruby-build
+13
-7
No files found.
bin/ruby-build
View file @
1fb955ee
...
@@ -188,12 +188,13 @@ verify_checksum() {
...
@@ -188,12 +188,13 @@ verify_checksum() {
http
()
{
http
()
{
local
method
=
"
$1
"
local
method
=
"
$1
"
local
url
=
"
$2
"
local
url
=
"
$2
"
local
file
=
"
$3
"
[
-n
"
$url
"
]
||
return
1
[
-n
"
$url
"
]
||
return
1
if
type
curl &>/dev/null
;
then
if
type
curl &>/dev/null
;
then
"http_
${
method
}
_curl"
"
$url
"
"http_
${
method
}
_curl"
"
$url
"
"
$file
"
elif
type
wget &>/dev/null
;
then
elif
type
wget &>/dev/null
;
then
"http_
${
method
}
_wget"
"
$url
"
"http_
${
method
}
_wget"
"
$url
"
"
$file
"
else
else
echo
"error: please install
\`
curl
\`
or
\`
wget
\`
and try again"
>
&2
echo
"error: please install
\`
curl
\`
or
\`
wget
\`
and try again"
>
&2
exit
1
exit
1
...
@@ -205,7 +206,7 @@ http_head_curl() {
...
@@ -205,7 +206,7 @@ http_head_curl() {
}
}
http_get_curl
()
{
http_get_curl
()
{
curl
-qsSLf
"
$1
"
curl
-
C
-
-o
"
${
2
:-
-
}
"
-
qsSLf
"
$1
"
}
}
http_head_wget
()
{
http_head_wget
()
{
...
@@ -213,7 +214,7 @@ http_head_wget() {
...
@@ -213,7 +214,7 @@ http_head_wget() {
}
}
http_get_wget
()
{
http_get_wget
()
{
wget
-nv
-
O-
"
$1
"
wget
-nv
-
c
-O
"
${
2
:-
-
}
"
"
$1
"
}
}
fetch_tarball
()
{
fetch_tarball
()
{
...
@@ -240,8 +241,13 @@ fetch_tarball() {
...
@@ -240,8 +241,13 @@ fetch_tarball() {
download_tarball
"
$package_url
"
"
$package_filename
"
"
$checksum
"
download_tarball
"
$package_url
"
"
$package_filename
"
"
$checksum
"
}
}
{
tar
xzvf
"
$package_filename
"
{
if
tar
xzvf
"
$package_filename
"
;
then
rm
-f
"
$package_filename
"
if
[
-z
"
$KEEP_BUILD_PATH
"
]
;
then
rm
-f
"
$package_filename
"
else
true
fi
fi
}
>
&4 2>&1
}
>
&4 2>&1
}
}
...
@@ -266,7 +272,7 @@ download_tarball() {
...
@@ -266,7 +272,7 @@ download_tarball() {
echo
"->
$package_url
"
>
&2
echo
"->
$package_url
"
>
&2
{
http get
"
$package_url
"
>
"
$package_filename
"
{
http get
"
$package_url
"
"
$package_filename
"
verify_checksum
"
$package_filename
"
"
$checksum
"
verify_checksum
"
$package_filename
"
"
$checksum
"
}
>
&4 2>&1
||
return
1
}
>
&4 2>&1
||
return
1
...
...
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