Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
3f769dc9
Commit
3f769dc9
authored
Apr 08, 2015
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-apkrepos: exclude faulty mirrors from detection
ref
#4017
parent
c113ed8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
setup-apkrepos.in
setup-apkrepos.in
+5
-2
No files found.
setup-apkrepos.in
View file @
3f769dc9
...
...
@@ -39,17 +39,20 @@ add_random_mirror() {
time_cmd
()
{
local
start
=
$(
cut
-d
' '
-f1
/proc/uptime
)
$@
>
&2
local
ret
=
$?
awk
-v
start
=
$start
-v
end
=
$(
cut
-d
' '
-f1
/proc/uptime
)
\
'BEGIN {print end - start; exit}'
return
$ret
}
find_fastest_mirror
()
{
export
http_proxy
=
local
url
=
for
url
in
$MIRRORS
;
do
echo
$(
time_cmd apk update
--quiet
$apk_root_opt
\
local time
=
$(
time_cmd apk update
--quiet
$apk_root_opt
\
--repository
$url
/edge/main
\
--repositories-file
/dev/null
)
$url
--repositories-file
/dev/null
)
||
continue
echo
"
$time
$url
"
done
|
awk
' {
if (!current) {
current=$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