harmonize with coredesktop

This commit is contained in:
David Young
2026-10-28 14:35:07 -06:00
parent 866720c3c1
commit 9b9f1d5fdd
35 changed files with 1445 additions and 8 deletions
+12
View File
@@ -49,12 +49,24 @@ mkdir -p "$HOME/.local/bin" "$MINISERVER/updates.d"
install_script "$MINISERVER/update" ~/.local/bin/update
install_script "$MINISERVER/refresh" ~/.local/bin/refresh
install_script "$MINISERVER/sibling" ~/.local/bin/sibling
install_script "$MINISERVER/version" ~/.local/bin/version
install_script "$MINISERVER/configure" ~/.local/bin/configure
if [[ -z "$UPDATE_REEXECED" ]]; then
export UPDATE_REEXECED=1
exec ~/.local/bin/update
fi
# An upgrade that runs out of disk space part way through can leave the system
# half-upgraded. Set UPDATE_FORCE=1 to skip this check.
MIN_FREE_GIB=10
FREE_KIB="$(df -k --output=avail / | tail -n 1 | tr -d ' ')"
if [[ -z "$UPDATE_FORCE" && "$FREE_KIB" =~ ^[0-9]+$ ]] && (( FREE_KIB < MIN_FREE_GIB * 1024 * 1024 )); then
echo "Only $(( FREE_KIB / 1024 / 1024 )) GiB free on /; updating needs at least $MIN_FREE_GIB GiB."
echo "Free up space (sudo paccache -rk1 clears old cached packages), or run: UPDATE_FORCE=1 update"
exit 1
fi
# Ask for the password once, then keep sudo's cached credentials fresh until
# update exits, so long-running hooks don't stop for a password again.
sudo -v || exit 1