alpine: add latest-update option

This commit is contained in:
2025-11-01 21:24:46 +01:00
parent cb2b798a66
commit 45afd634db

View File

@@ -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