File: libglib2.0-0.postinst.in

package info (click to toggle)
glib2.0 2.58.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 48,444 kB
  • sloc: ansic: 452,195; xml: 16,781; python: 6,149; makefile: 3,776; sh: 1,499; perl: 1,140; cpp: 9
file content (56 lines) | stat: -rw-r--r-- 1,834 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
set -e


handle_triggers () {
    local trigger
    local dirs

    for trigger in "$@"; do
        if ! [ -d $trigger ]; then
            continue
        fi
        case $trigger in
          /usr/share/glib-2.0/schemas)
            # This is triggered everytime an application installs a
            # GSettings schema
            "/usr/lib/#MULTIARCH#/glib-2.0/glib-compile-schemas" /usr/share/glib-2.0/schemas || true
            ;;

          "/usr/lib/#MULTIARCH#/gio/modules"|/usr/lib/gio/modules)
            # This is triggered everytime an application installs a GIO
            # module into /usr/lib/#MULTIARCH#/gio/modules or the
            # backwards-compatible /usr/lib/gio/modules directory

            # The /usr/lib/gio/modules directory is no longer shipped by
            # libglib2.0 itself so we need to check to avoid a warning from
            # gio-querymodules
            dirs="/usr/lib/#MULTIARCH#/gio/modules"
            if [ -d /usr/lib/gio/modules ] && [ $(dpkg --print-architecture) = "#ARCH#" ]; then
                dirs="$dirs /usr/lib/gio/modules"
            fi
            "/usr/lib/#MULTIARCH#/glib-2.0/gio-querymodules" $dirs || true
            ;;
        esac
    done
}

if [ "$1" = triggered ]; then
    handle_triggers $2
    exit 0
fi

#DEBHELPER#

# Also handle the initial installation
if [ -d /usr/share/glib-2.0/schemas ]; then
    "/usr/lib/#MULTIARCH#/glib-2.0/glib-compile-schemas" /usr/share/glib-2.0/schemas || true
fi
if [ -d "/usr/lib/#MULTIARCH#/gio/modules" ]; then
    "/usr/lib/#MULTIARCH#/glib-2.0/gio-querymodules" "/usr/lib/#MULTIARCH#/gio/modules" || true
fi
if [ -d /usr/lib/gio/modules ] && [ $(dpkg --print-architecture) = "#ARCH#" ]; then
    "/usr/lib/#MULTIARCH#/glib-2.0/gio-querymodules" /usr/lib/gio/modules || true
fi

# vim:set sw=4 sts=4 et: