change to update format

This commit is contained in:
David Young
2026-10-23 08:04:42 -06:00
parent 0b2ac8ca29
commit 872ad4b831
14 changed files with 663 additions and 111 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
MINISERVER="$HOME/.local/share/MiniServer"
source "$MINISERVER/utils.sh"
source "$MINISERVER/packages.conf"
STATUS=0
# A machine that hasn't updated in a while can have a keyring too old to verify
# the new packages. Update it first; the -Su below completes this -Sy.
echo "Updating Arch keyring..."
sudo pacman -Sy --needed --noconfirm archlinux-keyring || STATUS=1
# script(1) keeps pacman's progress bars while logging its output for the
# initramfs check
echo "Updating Arch..."
mkdir -p "$(dirname "$PACMAN_UPDATE_LOG")"
: > "$PACMAN_UPDATE_LOG"
sudo script -qefc "pacman -Su --noconfirm" "$PACMAN_UPDATE_LOG" || STATUS=1
if initramfs_build_failed; then
echo -e "\e[31mRebuilding the initramfs failed. Don't reboot until it's fixed - see the output above or $PACMAN_UPDATE_LOG.\e[0m"
STATUS=1
fi
echo "Checking for new packages..."
install_packages "${SERVERS[@]}"
install_packages "${UTILITIES[@]}"
exit $STATUS