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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
0e82dc7c
Commit
0e82dc7c
authored
Aug 06, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-apkrepos: add option to just add random mirror and don't prompt anymore
parent
2d20af0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
14 deletions
+43
-14
setup-apkrepos.in
setup-apkrepos.in
+43
-14
No files found.
setup-apkrepos.in
View file @
0e82dc7c
...
...
@@ -120,6 +120,28 @@ edit_repositories() {
test
"
$(
md5sum
$APKREPOS_PATH
)
"
!=
"
$md5
"
}
usage
()
{
cat
<<
__EOF__
usage: setup-apkrepos [-hr]
Setup apk repositories
options:
-h Show this help
-r Add a random mirror and do not prompt
__EOF__
exit
1
}
while
getopts
"hr"
opt
;
do
case
$opt
in
h
)
usage
;;
r
)
JUSTADDRANDOM
=
1
;;
esac
done
# main
# install alpine-mirrors if its not already there
to_uninstall
=
...
...
@@ -143,10 +165,16 @@ if [ -r "$APKREPOS_PATH" ]; then
APKREPOS
=
`
cat
"
$APKREPOS_PATH
"
`
fi
get_alpine_release
default_answer
=
f
changed
=
while
true
;
do
if
[
-n
"
$JUSTADDRANDOM
"
]
;
then
show_mirror_list
>
/dev/null
add_random_mirror
&&
changed
=
1
&&
break
else
show_mirror_list
prompt_setup_method
$default_answer
...
...
@@ -162,6 +190,7 @@ while true; do
if
[
-n
"
$changed
"
]
;
then
default_answer
=
"done"
fi
fi
done
if
[
-n
"
$changed
"
]
;
then
...
...
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