2009-04-18 13:07:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Updates GTK+ icon cache file with gtk-update-icon-cache(1).
|
|
|
|
#
|
|
|
|
# Arguments: $1 = action [run/targets]
|
|
|
|
# $2 = target [post-install/post-remove]
|
|
|
|
# $3 = pkgname
|
|
|
|
# $4 = version
|
|
|
|
#
|
2009-05-19 00:13:58 +00:00
|
|
|
iconcache_bin=usr/bin/gtk-update-icon-cache
|
2009-04-18 13:07:51 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
targets)
|
|
|
|
echo "post-install post-remove"
|
|
|
|
;;
|
|
|
|
run)
|
|
|
|
case "$2" in
|
2009-05-19 00:13:58 +00:00
|
|
|
post-install)
|
2009-04-19 23:20:31 +00:00
|
|
|
for dir in ${gtk_iconcache_dirs}; do
|
|
|
|
if [ -x ${iconcache_bin} ]; then
|
|
|
|
echo -n "Updating GTK+ icon cache for "
|
|
|
|
echo -n "${dir}... "
|
|
|
|
${iconcache_bin} -q -f -t ${dir}
|
|
|
|
echo "done."
|
|
|
|
fi
|
|
|
|
done
|
2009-04-18 13:07:51 +00:00
|
|
|
;;
|
2009-05-19 00:13:58 +00:00
|
|
|
post-remove)
|
|
|
|
for dir in ${gtk_iconcache_dirs}; do
|
|
|
|
if [ -f ${dir}/icon-theme.cache ]; then
|
|
|
|
rm -f ${dir}/icon-theme.cache
|
|
|
|
echo "Removed GTK+ icon theme cache for ${dir}."
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
;;
|
2009-04-18 13:07:51 +00:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|