Import the remaining utilities.
[utils/utils.git] / system-update
diff --git a/system-update b/system-update
new file mode 100755 (executable)
index 0000000..8ec35a5
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+# system-update [--no-best]
+#
+# Update the system using Matt's RPM tools.
+# https://mattmccutchen.net/utils/#rpm
+
+best=true
+for arg in "$@"; do
+  case "$arg" in
+    (--no-best) best=false;;
+    (*) echo >&2 "Unsupported argument $arg"; exit 1;;
+  esac
+done
+
+# Obviously, if we get many more variations, we'll factor this out...
+if $best; then
+  dnf distro-sync --best && dnf autoremove && rpm-audit && rpmconf-matt && rpm-overrides-matt
+else
+  # No point in trying to audit
+  dnf distro-sync && dnf autoremove && rpmconf-matt && rpm-overrides-matt
+fi