Files
omarchycn/bin/omarchy-update-available
T
David Heinemeier Hansson 3fd36802ac Simplify the system-update check
No need for a panel, just focus on the main omarchy package
2026-06-23 15:59:27 +02:00

25 lines
512 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Check whether Omarchy package updates are available.
set -euo pipefail
package=""
if pacman -Qq omarchy-dev >/dev/null 2>&1; then
package=omarchy-dev
elif pacman -Qq omarchy >/dev/null 2>&1; then
package=omarchy
fi
if [[ -n $package ]]; then
update=$(checkupdates --nocolor 2>/dev/null | awk -v package="$package" '$1 == package { print; exit }' || true)
fi
if [[ -n ${update:-} ]]; then
printf '%s\n' "$update"
exit 0
else
echo "Omarchy is up to date"
exit 1
fi