xbps-triggers: update to 0.2.

Update gtk-pixbuf-loaders trigger for the new gdk-pixbuf package.
This commit is contained in:
Juan RP 2010-10-23 17:49:36 +02:00
parent 68198645d9
commit f446cf5b2b
3 changed files with 11 additions and 33 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
#
# Updates GTK+ gdk pixbuf modules file with gdk-pixbuf-query-loaders(1).
# Updates's GDK Pixbuf loaders cache with gdk-pixbuf-query-loaders(1).
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-install/post-remove]
@ -15,22 +15,26 @@ VERSION="$4"
UPDATE="$5"
pixbuf_bin=usr/bin/gdk-pixbuf-query-loaders
pixbuf_loaders=etc/gtk-2.0/gdk-pixbuf.loaders
case "$ACTION" in
targets)
echo "post-install post-remove"
;;
run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
[ -f ${pixbuf_loaders} ] && rm -f ${pixbuf_loaders}
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gdk-pixbuf" ]; then
_cache_file=$(${pixbuf_bin} --print-cache-file)
[ -f .${_cache_file} ] && rm -f .${_cache_file}
break
fi
case "$TARGET" in
post-*)
if [ -f etc/gtk-2.0/gdk-pixbuf.loaders ]; then
echo " Removing obsolete conf file: etc/gtk-2.0/gdk-pixbuf.loaders"
rm -f etc/gtk-2.0/gdk-pixbuf.loaders
fi
if [ -x ${pixbuf_bin} ]; then
echo "Updating GTK's pixbuf modules file..."
${pixbuf_bin} > ${pixbuf_loaders}
echo "Updating GDK Pixbuf loaders cache..."
${pixbuf_bin} --update-cache
fi
;;
esac