diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-04-17 12:38:37 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-04-25 19:57:48 +0200 |
commit | 63b07de22bddb844d12c1164c1b48b0516b7fa9e (patch) | |
tree | 60c15df47f8ae9313fad5229486d540e7bb0aa7a /eclass/gnome2-utils.eclass | |
parent | www-apps/icingaweb2: fix to dep on php[nls] bug 615004 (diff) | |
download | gentoo-63b07de22bddb844d12c1164c1b48b0516b7fa9e.tar.gz gentoo-63b07de22bddb844d12c1164c1b48b0516b7fa9e.tar.bz2 gentoo-63b07de22bddb844d12c1164c1b48b0516b7fa9e.zip |
gnome2-utils.eclass: Make gnome2_icon_cache_update update all themes
Make the gnome2_icon_cache_update function update all icon themes rather
than depending on gnome2_icon_savelist to select themes to update. This
makes the function easier to use whenever the developer needs it
explicitly (i.e. knows that themes are installed), while the overhead of
regenerating multiple caches is neglible.
Diffstat (limited to 'eclass/gnome2-utils.eclass')
-rw-r--r-- | eclass/gnome2-utils.eclass | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index f2aa2391a532..7db092e1ec66 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -240,30 +240,30 @@ gnome2_icon_cache_update() { local retval=0 local fails=( ) - for dir in ${GNOME2_ECLASS_ICONS} + for dir in "${EROOT%/}"/usr/share/icons/* do - if [[ -f "${EROOT}${dir}/index.theme" ]] ; then + if [[ -f "${dir}/index.theme" ]] ; then local rv=0 - "${updater}" -qf "${EROOT}${dir}" + "${updater}" -qf "${dir}" rv=$? if [[ ! $rv -eq 0 ]] ; then - debug-print "Updating cache failed on ${EROOT}${dir}" + debug-print "Updating cache failed on ${dir}" # Add to the list of failures - fails[$(( ${#fails[@]} + 1 ))]="${EROOT}${dir}" + fails+=( "${dir}" ) retval=2 fi - elif [[ $(ls "${EROOT}${dir}") = "icon-theme.cache" ]]; then + elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then # Clear stale cache files after theme uninstallation - rm "${EROOT}${dir}/icon-theme.cache" + rm "${dir}/icon-theme.cache" fi - if [[ -z $(ls "${EROOT}${dir}") ]]; then + if [[ -z $(ls "${dir}") ]]; then # Clear empty theme directories after theme uninstallation - rmdir "${EROOT}${dir}" + rmdir "${dir}" fi done |