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 2>&1
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#
|