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
e274d834
Commit
e274d834
authored
Nov 18, 2016
by
ShuYu Wang
Committed by
GitHub
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bibrocksdb_sys/build.sh: add retries in download
parent
93f4208e
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 @
e274d834
...
...
@@ -26,15 +26,16 @@ function md5_check() {
[[
"
$hash
"
==
"
$2
"
]]
||
error
$1
:
hash
not correct, expect
$2
, got
$hash
}
retry
=
3
function
download
()
{
if
[[
-f
$2
]]
&&
md5_check
$2
$3
;
then
return
fi
if
which
wget
&>/dev/null
;
then
wget
$1
-O
$2
elif
which
curl
&>/dev/null
;
then
curl
-L
$1
-o
$2
if
which
curl
&>/dev/null
;
then
curl
--retry
$retry
-L
$1
-o
$2
elif
which
wget
&>/dev/null
;
then
wget
--retry-connrefused
--waitretry
=
1
--read-timeout
=
20
--timeout
=
15
--tries
$retry
$1
-O
$2
else
error can
\'
t find wget and curl.
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