2009-04-18 15:07:51 +02: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 02:13:58 +02:00
|
|
|
iconcache_bin=usr/bin/gtk-update-icon-cache
|
2009-04-18 15:07:51 +02:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
targets)
|
|
|
|
echo "post-install post-remove"
|
|
|
|
;;
|
|
|
|
run)
|
2009-05-19 10:42:57 +02:00
|
|
|
if [ "$2" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
|
|
|
|
for dir in ${gtk_iconcache_dirs}; do
|
|
|
|
if [ -f ${dir}/icon-theme.cache ]; then
|
|
|
|
rm -f ${dir}/icon-theme.cache
|
|
|
|
echo -n "Removed GTK+ icon theme "
|
|
|
|
echo "cache for ${dir}."
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
break
|
|
|
|
fi
|
2009-04-18 15:07:51 +02:00
|
|
|
case "$2" in
|
2009-05-19 10:42:57 +02:00
|
|
|
post-*)
|
2009-04-20 01:20:31 +02:00
|
|
|
for dir in ${gtk_iconcache_dirs}; do
|
|
|
|
if [ -x ${iconcache_bin} ]; then
|
|
|
|
echo -n "Updating GTK+ icon cache for "
|
2009-05-19 10:42:57 +02:00
|
|
|
echo "${dir}..."
|
2009-04-20 01:20:31 +02:00
|
|
|
${iconcache_bin} -q -f -t ${dir}
|
2009-05-19 02:13:58 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
;;
|
2009-04-18 15:07:51 +02:00
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|