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