783dc64e4b
--HG-- extra : convert_revision : 38fd5a6f1aea9fc17b8c9055d8a56c9e5f4b8aa7
38 lines
685 B
Bash
Executable file
38 lines
685 B
Bash
Executable file
#!/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
|