Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ByBuwqGStVNLgykAENjviD
arch_update
Arch Linux system update script
Install
git clone https://git.streifling.com/jason/arch_update.git ~/src/arch_update
ln -s ~/src/arch_update/arch_update ~/.local/bin/
Nothing else is needed; a config is optional.
Config
Settings are read from ~/.config/arch_update/config, see config.example.
Hooks
After the system update and before the post snapshot, every executable file in
hooks.d/ of this repository and in ~/.config/arch_update/hooks.d/ runs in
alphabetical order. A failing hook is reported, the remaining hooks still run.
Variables from the config are available as environment variables.
Every hook checks itself whether it has work on this machine. A file in
~/.config/arch_update/hooks.d/ replaces the repository hook of the same name,
so an empty file disables it:
mkdir -p ~/.config/arch_update/hooks.d
touch ~/.config/arch_update/hooks.d/40-nvim-vim
Pre hooks
pre-hooks.d/ works the same way, but runs before the pre snapshot, so the
snapshot holds its output. If a pre hook fails, the update only continues after
confirmation. pre-hooks.d/10-db-backup dumps every PostgreSQL server on the
host and in the containers of DOCKER_COMPOSES into DB_BACKUP_DIR and keeps
the newest DB_BACKUP_KEEP runs.
Docker compose
Without DOCKER_COMPOSES in the config, every running compose project is
updated and backed up.