Contents of /mage/trunk/include/gtk2.minc
Parent Directory | Revision Log
Revision 5872 -
(show annotations)
(download)
Fri Oct 17 08:05:25 2014 UTC (9 years, 11 months ago) by niro
File size: 686 byte(s)
Fri Oct 17 08:05:25 2014 UTC (9 years, 11 months ago) by niro
File size: 686 byte(s)
-sync with upstream
1 | # $Id$ |
2 | |
3 | gtk2_update_icon_cache() |
4 | { |
5 | local icons |
6 | |
7 | if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
8 | then |
9 | if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] |
10 | then |
11 | echo "Searching icon directories ..." |
12 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
13 | icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
14 | popd &> /dev/null |
15 | else |
16 | icons="usr/share/icons/hicolor" |
17 | fi |
18 | |
19 | # abort here, if no icons where found |
20 | [[ -z ${icons} ]] && return |
21 | |
22 | echo "Updating icons cache ..." |
23 | local i |
24 | for i in ${icons} |
25 | do |
26 | if [[ -f ${MROOT}/${i}/index.theme ]] |
27 | then |
28 | ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
29 | fi |
30 | done |
31 | fi |
32 | } |