fix alpine update script to use shared cache
This commit is contained in:
parent
9ceae1e7f1
commit
4c0fd1c103
1 changed files with 5 additions and 6 deletions
|
@ -19,7 +19,7 @@ for arg in "$@"; do
|
||||||
noconfirm="true"
|
noconfirm="true"
|
||||||
;;
|
;;
|
||||||
-r|--reboot)
|
-r|--reboot)
|
||||||
reboot="true"G
|
reboot="true"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -27,12 +27,11 @@ done
|
||||||
printf ""$font_colored_bold">> system update started..."$font_default"\n"
|
printf ""$font_colored_bold">> system update started..."$font_default"\n"
|
||||||
|
|
||||||
printf ""$font_colored"> updating packages..."$font_default"\n"
|
printf ""$font_colored"> updating packages..."$font_default"\n"
|
||||||
[[ "$noconfirm" ]] && apk update --progress || apk update --progress --interactive
|
[[ "$noconfirm" ]] && apk --update-cache upgrade --progress || apk --update-cache upgrade --progress --interactive
|
||||||
[[ "$noconfirm" ]] && apk upgrade --progress || apk update --progress --interactive
|
|
||||||
|
|
||||||
printf ""$font_colored"> cleaning cache..."$font_default"\n"
|
#printf ""$font_colored"> cleaning cache..."$font_default"\n"
|
||||||
apk cache clean &> /dev/null
|
#apk cache clean &> /dev/null
|
||||||
rm -rf "/var/cache/apk/*"
|
#rm -rf "/var/cache/apk/*"
|
||||||
|
|
||||||
orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)"
|
orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)"
|
||||||
if [[ "$orphans" ]]; then
|
if [[ "$orphans" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue