
echo "Updating desktop database: update-desktop-database -q opt/trinity/share/applications/tde"
chroot "$rootdir" /usr/bin/update-desktop-database -q opt/trinity/share/applications/tde 2> /dev/null

echo "Updating ICON cache: gtk-update-icon-cache -q -f -i opt/trinity/share/icons/hicolor"
chroot "$rootdir" /usr/bin/gtk-update-icon-cache -q -f -i opt/trinity/share/icons/hicolor 2> /dev/null

echo "Updating ICON cache: gtk-update-icon-cache -q -f -i opt/trinity/share/icons/crystalsvg"
chroot "$rootdir" /usr/bin/gtk-update-icon-cache -q -f -i opt/trinity/share/icons/crystalsvg 2> /dev/null

# Re-create default TDE symlink in the final location,
# instead of pointing to the package directory
(
    cd -- "${rootdir}/opt/trinity/share/icons" && \
     ln -sf crystalsvg default.tde
)

