File: libvlc-bin.postinst.in

package info (click to toggle)
vlc 3.0.12-0+deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 203,740 kB
  • sloc: ansic: 436,293; cpp: 104,587; objc: 35,648; sh: 6,704; makefile: 6,499; javascript: 4,900; xml: 1,610; asm: 1,355; yacc: 640; python: 323; lex: 88; perl: 77; sed: 16
file content (34 lines) | stat: -rw-r--r-- 951 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
set -e

run_vlc_cache_gen() {
    if ! test -d /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins
    then
        return
    fi
    files=`find /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins -name '*.so' -type f -print -quit`
    if test -n "$files"
    then
        # run vlc-cache-gen since there are plugins
        if ! /usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins
        then
            echo "WARNING: Regenerating VLC plugin cache failed."
            echo "Please run '/usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins' manually."
        fi
    else
        # no plugins, so remove plugins.dat
        rm -f /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins/plugins.dat
    fi
}

case "$1" in
    triggered)
        run_vlc_cache_gen
        exit 0
        ;;
    configure)
        dpkg-trigger /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins
        ;;
esac

#DEBHELPER#