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
00263451
Commit
00263451
authored
Mar 03, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-apkrepos: install alpine-mirrors if needed
parent
de967ed0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
setup-apkrepos.in
setup-apkrepos.in
+27
-14
No files found.
setup-apkrepos.in
View file @
00263451
...
...
@@ -5,20 +5,6 @@ PREFIX=
.
$PREFIX
/lib/libalpine.sh
MIRRORS_PATH
=
/usr/share/alpine-mirrors/MIRRORS.txt
if
[
-z
"
$MIRRORS
"
]
&&
[
-r
"
$MIRRORS_PATH
"
]
;
then
MIRRORS
=
`
cat
$MIRRORS_PATH
`
fi
RELEASES_PATH
=
/usr/share/alpine-mirrors/RELEASES.txt
if
[
-z
"
$RELEASES
"
]
&&
[
-r
"
$RELEASES_PATH
"
]
;
then
RELEASES
=
`
cat
$RELEASES_PATH
`
fi
APKREPOS_PATH
=
/etc/apk/repositories
if
[
-r
"
$APKREPOS_PATH
"
]
;
then
APKREPOS
=
`
cat
"
$APKREPOS_PATH
"
`
fi
get_hostname_from_url
()
{
local
n
=
${
1
#*
://
}
...
...
@@ -135,6 +121,28 @@ edit_repositories() {
}
# main
# install alpine-mirrors if its not already there
to_uninstall
=
if
!
apk info
-q
-e
alpine-mirrors
;
then
apk add
-q
alpine-mirrors
to_uninstall
=
alpine-mirrors
fi
MIRRORS_PATH
=
/usr/share/alpine-mirrors/MIRRORS.txt
if
[
-z
"
$MIRRORS
"
]
&&
[
-r
"
$MIRRORS_PATH
"
]
;
then
MIRRORS
=
`
cat
$MIRRORS_PATH
`
fi
RELEASES_PATH
=
/usr/share/alpine-mirrors/RELEASES.txt
if
[
-z
"
$RELEASES
"
]
&&
[
-r
"
$RELEASES_PATH
"
]
;
then
RELEASES
=
`
cat
$RELEASES_PATH
`
fi
APKREPOS_PATH
=
/etc/apk/repositories
if
[
-r
"
$APKREPOS_PATH
"
]
;
then
APKREPOS
=
`
cat
"
$APKREPOS_PATH
"
`
fi
get_alpine_release
default_answer
=
f
changed
=
...
...
@@ -160,3 +168,8 @@ if [ -n "$changed" ]; then
echo
-n
"Updating repository indexes... "
apk update
-q
&&
echo
"done."
fi
# clean up
if
[
-n
"
$to_uninstall
"
]
;
then
apk del
-q
alpine-mirrors
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