mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add update logger w/ analysis
This commit is contained in:
18
bin/omarchy-update-analyze-logs
Executable file
18
bin/omarchy-update-analyze-logs
Executable file
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user