aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-04-02 21:30:42 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-04-11 12:58:56 +0000
commitb08addafe3bcb90240451c8e1fe1e8bbc6eada85 (patch)
treeb68cd6f662d6f7c2be0481bd01f70c4574dde448
parentb54ec604f4ab2e0e2eda5cfd9baf74d108caab94 (diff)
downloadalpine-conf-b08addafe3bcb90240451c8e1fe1e8bbc6eada85.tar.bz2
alpine-conf-b08addafe3bcb90240451c8e1fe1e8bbc6eada85.tar.xz
setup-apkrepos: fetch mirrors from mirrors.a.o
-rw-r--r--setup-apkrepos.in18
1 files changed, 3 insertions, 15 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 9354d0a..91c2806 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -2,6 +2,7 @@
PROGRAM=setup-apkrepos
PREFIX=
+MIRRORS_URL=https://mirrors.alpinelinux.org/mirrors.txt
. $PREFIX/lib/libalpine.sh
@@ -176,17 +177,8 @@ while getopts "1fhr" opt; do
done
shift $(($OPTIND - 1))
-# main
-# install alpine-mirrors if its not already there
-to_uninstall=
-if ! apk info --quiet --installed alpine-mirrors; then
- apk add --force --quiet --virtual .setup-apkrepos alpine-mirrors
- to_uninstall=.setup-apkrepos
-fi
-
-MIRRORS_PATH=/usr/share/alpine-mirrors/MIRRORS.txt
-if [ -z "$MIRRORS" ] && [ -r "$MIRRORS_PATH" ]; then
- MIRRORS=$(cat $MIRRORS_PATH)
+if [ -z "$MIRRORS" ]; then
+ MIRRORS=$(wget -qO- $MIRRORS_URL)
fi
APKREPOS_PATH="${ROOT}"etc/apk/repositories
@@ -242,7 +234,3 @@ if $changed; then
apk update --quiet $apk_root_opt && echo "done."
fi
-# clean up
-if [ -n "$to_uninstall" ]; then
- apk del --quiet $to_uninstall
-fi