#!/bin/sh
set -e

if [ "$1" = "configure" ]; then
    echo "Updating GLib schemas..."
    glib-compile-schemas "/usr/share/glib-2.0/schemas" || true  # Run it, but don't fail if missing
    echo "Update the icon cache..."
    for theme in hicolor HighContrast ubuntu-mono-dark ubuntu-mono-light; do
        gtk-update-icon-cache -f "/usr/share/icons/$theme" || true
    done
    # echo "Update mime database..."
    # update-mime-database /usr/share/mime || true  # Run it, but don't fail if missing
fi

exit 0
