Skip to content

Commit

Permalink
hooks: use pkg-config in gdk-pixbuf-query-loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jul 20, 2011
1 parent 2f389a5 commit d759b65
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/hooks.d/gdk-pixbuf-query-loaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ for bin in ${binaries} ; do
fi
done

cachefile=$(pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0)
if grep -q "gdk-pixbuf-2.0/.*/loaders/.*\.(so|a)" ${BEE_METADIR}/${pkg}/FILES ; then
gdk_pixbuf_moduledir=$(pkg-config --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0)
gdk_pixbuf_cache_file=$(pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0)

if grep -q "${gdk_pixbuf_moduledir}" ${BEE_METADIR}/${pkg}/FILES ; then
case "${action}" in
"post-install")
rm -f ${cachefile}
rm -f ${gdk_pixbuf_cache_file}
gdk-pixbuf-query-loaders --update-cache
;;
"pre-remove")
rm -f ${cachefile}
rm -f ${gdk_pixbuf_cache_file}
;;
"post-remove")
gdk-pixbuf-query-loaders --update-cache
Expand Down

0 comments on commit d759b65

Please sign in to comment.