Rename setexec to chexec.
[utils/utils.git] / system-update
1 #!/bin/bash
2 # system-update [--no-best]
3 #
4 # Update the system using Matt's RPM tools.
5 # https://mattmccutchen.net/utils/#rpm
6
7 best=true
8 for arg in "$@"; do
9   case "$arg" in
10     (--no-best) best=false;;
11     (*) echo >&2 "Unsupported argument $arg"; exit 1;;
12   esac
13 done
14
15 # Obviously, if we get many more variations, we'll factor this out...
16 if $best; then
17   dnf distro-sync --best && dnf autoremove && rpm-audit && rpmconf-matt && rpm-overrides-matt
18 else
19   # No point in trying to audit
20   dnf distro-sync && dnf autoremove && rpmconf-matt && rpm-overrides-matt
21 fi