Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
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
fangzongwu
rust-rocksdb
Commits
33ed290b
Commit
33ed290b
authored
Nov 25, 2016
by
goroutine
Committed by
GitHub
Nov 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #55 from andelf/retry-download
bibrocksdb_sys/build.sh: add retries in download
parents
93f4208e
e274d834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
build.sh
librocksdb_sys/build.sh
+5
-4
No files found.
librocksdb_sys/build.sh
View file @
33ed290b
...
@@ -26,15 +26,16 @@ function md5_check() {
...
@@ -26,15 +26,16 @@ function md5_check() {
[[
"
$hash
"
==
"
$2
"
]]
||
error
$1
:
hash
not correct, expect
$2
, got
$hash
[[
"
$hash
"
==
"
$2
"
]]
||
error
$1
:
hash
not correct, expect
$2
, got
$hash
}
}
retry
=
3
function
download
()
{
function
download
()
{
if
[[
-f
$2
]]
&&
md5_check
$2
$3
;
then
if
[[
-f
$2
]]
&&
md5_check
$2
$3
;
then
return
return
fi
fi
if
which
wget
&>/dev/null
;
then
if
which
curl
&>/dev/null
;
then
wget
$1
-O
$2
curl
--retry
$retry
-L
$1
-o
$2
elif
which
curl
&>/dev/null
;
then
elif
which
wget
&>/dev/null
;
then
curl
-L
$1
-o
$2
wget
--retry-connrefused
--waitretry
=
1
--read-timeout
=
20
--timeout
=
15
--tries
$retry
$1
-O
$2
else
else
error can
\'
t find wget and curl.
error can
\'
t find wget and curl.
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