# $Id$ gtk2_update_icon_cache() { local icons if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] then if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] then echo "Searching icon directories ..." pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) popd &> /dev/null else icons="usr/share/icons/hicolor" fi # abort here, if no icons where found [[ -z ${icons} ]] && return echo "Updating icons cache ..." local i for i in ${icons} do if [[ -f ${MROOT}/${i}/index.theme ]] then ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} fi done fi }