From 63b0cd64bd7a5e0f37ab4b1a081983b9b39eb577 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 8 Jan 2026 16:52:49 -0500 Subject: [PATCH] Add update logger w/ analysis --- bin/omarchy-update-analyze-logs | 18 ++++++++++++++++++ bin/omarchy-update-perform | 6 ++++++ 2 files changed, 24 insertions(+) create mode 100755 bin/omarchy-update-analyze-logs diff --git a/bin/omarchy-update-analyze-logs b/bin/omarchy-update-analyze-logs new file mode 100755 index 00000000..349506c5 --- /dev/null +++ b/bin/omarchy-update-analyze-logs @@ -0,0 +1,18 @@ +#!/bin/bash + +update_log="/tmp/omarchy-update.log" + +# Check for errors +if grep -qi "error" "$update_log"; then + echo -e "\e[31mNon-stopping errors detected during update:\e[0m" + grep -i "error" "$update_log" + echo +fi + +# Check for initramfs generation failure +if grep -q "Updating linux initcpios" "$update_log"; then + if ! grep -q "Initcpio image generation successful" "$update_log"; then + echo -e '\e[31mError: Initramfs generation may have failed. Review logs before restart.\e[0m' + echo + fi +fi diff --git a/bin/omarchy-update-perform b/bin/omarchy-update-perform index 82946cfd..c4fcc2cb 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -5,6 +5,9 @@ set -e # Ensure screensaver/sleep doesn't set in during updates hyprctl dispatch tagwindow +noidle &> /dev/null || true +# Capture update logs +exec > >(tee "/tmp/omarchy-update.log") 2>&1 + # Perform all update steps omarchy-update-time omarchy-update-keyring @@ -12,6 +15,9 @@ omarchy-update-available-reset omarchy-update-system-pkgs omarchy-migrate omarchy-hook post-update + +omarchy-update-analyze-logs + omarchy-update-restart # Re-enable screensaver/sleep after updates