summaryrefslogtreecommitdiffstats
path: root/scripts/postinst-intercepts/update_gtk_icon_cache
blob: a92bd840c6b6e2ffcb6341135e28c742c82da20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#
# SPDX-License-Identifier: MIT
#
# Post-install intercept for gtk-icon-cache.bbclass

set -e

# Update native pixbuf loaders
$STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache

for icondir in $D/usr/share/icons/*/ ; do
    if [ -d $icondir ] ; then
        for gtkuic_cmd in gtk-update-icon-cache gtk4-update-icon-cache ; do
            if [ -n "$(which $gtkuic_cmd)" ]; then
                $gtkuic_cmd -fqt  $icondir
            fi
        done
    fi
done