#!/bin/bash

# omarchy:summary=Update the current user's Flathub apps if Flathub is reachable

# Fedora has no AUR; the user-scoped third-party apps live on Flathub and
# update separately from the system upgrade. Strictly `--user`: never touch
# system flatpaks here.
if omarchy-pkg-aur-accessible; then
  echo -e "\e[32m\nUpdate Flathub apps\e[0m"
  flatpak update -y --user || exit 1
  echo
else
  echo -e "\e[31m\nFlathub is unavailable (so skipping updates)\e[0m"
  echo
fi
