From 4c0fd1c1039a33445318355351da09814c3c3fbd Mon Sep 17 00:00:00 2001 From: velvettear Date: Tue, 5 Nov 2024 16:12:57 +0100 Subject: [PATCH] fix alpine update script to use shared cache --- scripts/update/alpine.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/update/alpine.sh b/scripts/update/alpine.sh index 01e1855..02ff4a4 100755 --- a/scripts/update/alpine.sh +++ b/scripts/update/alpine.sh @@ -19,7 +19,7 @@ for arg in "$@"; do noconfirm="true" ;; -r|--reboot) - reboot="true"G + reboot="true" ;; esac done @@ -27,12 +27,11 @@ done printf ""$font_colored_bold">> system update started..."$font_default"\n" printf ""$font_colored"> updating packages..."$font_default"\n" -[[ "$noconfirm" ]] && apk update --progress || apk update --progress --interactive -[[ "$noconfirm" ]] && apk upgrade --progress || apk update --progress --interactive +[[ "$noconfirm" ]] && apk --update-cache upgrade --progress || apk --update-cache upgrade --progress --interactive -printf ""$font_colored"> cleaning cache..."$font_default"\n" -apk cache clean &> /dev/null -rm -rf "/var/cache/apk/*" +#printf ""$font_colored"> cleaning cache..."$font_default"\n" +#apk cache clean &> /dev/null +#rm -rf "/var/cache/apk/*" orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)" if [[ "$orphans" ]]; then