summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup-apkrepos.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 0c6b719..a7bfe1b 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -105,7 +105,8 @@ add_from_list() {
}
get_alpine_release() {
- local version="$(cat "${ROOT}"etc/alpine-release 2>/dev/null)"
+ local version="$(grep -Eom1 '[^/]+/main/?$' "${ROOT}"etc/apk/repositories | grep -Eo '^[^/]+' \
+ || cat "${ROOT}"etc/alpine-release 2>/dev/null)"
case "$version" in
*_git*|*_alpha*) release="edge";;
[0-9]*.[0-9]*.[0-9]*)