Skip to content

Commit

Permalink
Merge pull request #51 from nis65/develop
Browse files Browse the repository at this point in the history
feat: make update really uninteractive
  • Loading branch information
nis65 authored Dec 8, 2023
2 parents 51b57f0 + 333a7ec commit a004040
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions files/potos_files/usr/local/bin/update-system
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

apt-get update
yes | apt-get upgrade --with-new-pkgs --yes
apt-get update 2> /dev/null
LANG=C DEBIAN_FRONTEND=noninteractive apt-get upgrade --with-new-pkgs --yes
HELDBACK=$( LANG=C apt list --upgradable 2> /dev/null | grep -v ^Listing | sed -e "s|^\([^/]*\)/.*$|\1|")
if [[ ! -z "$HELDBACK" ]]
then
LANG=C DEBIAN_FRONTEND=noninteractive apt-get upgrade --with-new-pkgs --yes $HELDBACK
fi
apt autoremove --yes
apt-get clean
snap refresh

0 comments on commit a004040

Please sign in to comment.