bbb89a8be2
--HG-- extra : convert_revision : cd0a71d2b032dd56da02516d2befa00bc4d026f9
39 lines
685 B
Bash
39 lines
685 B
Bash
#!/bin/sh
|
|
#
|
|
# Updates GTK+ gdk pixbuf loaders file with gdk-pixbuf-queryloaders(1).
|
|
#
|
|
# Arguments: $1 = action [run/targets]
|
|
# $2 = target [post-install/post-remove]
|
|
# $3 = pkgname
|
|
# $4 = version
|
|
#
|
|
trigger="gtk-pixbuf-loaders"
|
|
pixbuf_bin=./usr/bin/gdk-pixbuf-queryloaders
|
|
pixbuf_loaders=./etc/gtk-2.0/gdk-pixbuf.loaders
|
|
|
|
case "$1" in
|
|
targets)
|
|
echo "post-install post-remove"
|
|
;;
|
|
run)
|
|
echo "Running $trigger trigger..."
|
|
|
|
case "$2" in
|
|
post-*)
|
|
if [ -f ${pixbuf_loaders} ]; then
|
|
rm -f ${pixbuf_loaders}
|
|
fi
|
|
if [ -x ${pixbuf_bin} ]; then
|
|
echo "Updating GTK's pixbuf loaders database..."
|
|
${pixbuf_bin} > ${pixbuf_loaders}
|
|
fi
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|