From 45afd634db3c5fdf166b7333f4c5762e9714b272 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 1 Nov 2025 21:24:46 +0100 Subject: [PATCH] alpine: add latest-update option --- alpine/init.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/alpine/init.sh b/alpine/init.sh index ba15a49..7c0d708 100644 --- a/alpine/init.sh +++ b/alpine/init.sh @@ -10,6 +10,7 @@ showHelp() { } main() { + APKLatestStable APKUpdateDist APKInstallBase Customizations @@ -17,6 +18,12 @@ main() { Reboot } +APKLatestStable() { + if whiptail --yesno "Use latest-stable repos ?" 0 0 3>&1 1>&2 2>&3; then + CURVER=$(cat /etc/os-release | grep "PRETTY_NAME" | grep 'Alpine Linux ' | awk -F'Alpine Linux ' '{print $2}' | awk -F'"' '{print $1}') + sed -i 's/'"${CURVER}"'/latest-stable/' /etc/apk/repositories + fi +} APKUpdateDist() { apk update apk upgrade