From e6711d286b02fe7ae0d6677b139fe5af0978b2fb Mon Sep 17 00:00:00 2001 From: William Wilhelm Date: Sun, 1 Jan 2023 04:57:36 +0000 Subject: setup-apkrepos: version detection for edge --- setup-apkrepos.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]*) -- cgit v1.2.3