File: libgdk-pixbuf2.0-0.postinst.in

package info (click to toggle)
gdk-pixbuf 2.36.5-2+deb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 29,812 kB
  • sloc: ansic: 34,006; sh: 5,235; makefile: 1,129; xml: 459; asm: 453; python: 193; perl: 56; sed: 16
file content (33 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -e

LOADERS_DIR=/usr/lib/#MULTIARCH#/gdk-pixbuf-2.0/2.10.0/loaders
LOADERS_DIR_OLD=/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders

if [ "$1" = triggered ]; then
    for trigger in $2; do
        if ! [ -d $trigger ]; then
            continue
        fi
        case $trigger in
          $LOADERS_DIR|$LOADERS_DIR_OLD)
            # This is triggered everytime an application installs a
            # GdkPixbuf loader
            /usr/lib/#MULTIARCH#/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
                $(find $LOADERS_DIR $LOADERS_DIR_OLD -name *.so 2> /dev/null) \
            > /usr/lib/#MULTIARCH#/gdk-pixbuf-2.0/2.10.0/loaders.cache || true
            ;;
        esac
    done
    exit 0
fi


#DEBHELPER#

# Also handle the initial installation
if [ -d $LOADERS_DIR ] || [ -d $LOADERS_DIR_OLD ]; then
    /usr/lib/#MULTIARCH#/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
        $(find $LOADERS_DIR $LOADERS_DIR_OLD -name *.so 2> /dev/null) \
    > /usr/lib/#MULTIARCH#/gdk-pixbuf-2.0/2.10.0/loaders.cache || true
fi