#!/bin/sh
# Noninteractive and idempotent. It must not discover users, unlock a keyring, create per-user
# files, contact a provider, register a client, install a cleanup timer, or start anything.
# Everything per-user belongs to OpenTranscribe Setup, run by the user who owns the session.
set -e

case "$1" in
  configure)
    if command -v update-desktop-database >/dev/null 2>&1; then
      update-desktop-database -q /usr/share/applications || true
    fi
    if command -v gtk-update-icon-cache >/dev/null 2>&1; then
      gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
    fi
    ;;
  abort-upgrade|abort-remove|abort-deconfigure) ;;
esac

exit 0
