alpine: add latest-update option
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user