This file is indexed.

postinst is in libreoffice-core 1:3.5.7-0ubuntu13.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh

set -e

PLATFORMID=linux_x86_64

validate_extensions() {
	/usr/lib/libreoffice/program/unopkg validate -v --shared
}

sync_extensions() {
  INSTDIR=`mktemp -d`
  export PYTHONPATH="/usr/lib/libreoffice/program"
  if [ -L /usr/lib/libreoffice/basis-link ]; then
	d=/var/lib/libreoffice/`readlink /usr/lib/libreoffice/basis-link`/
  else
	d=/usr/lib/libreoffice
  fi
  if [ -e /usr/lib/libreoffice/share/prereg/bundled ] && readlink /usr/lib/libreoffice/share/prereg/bundled 2>&1 >/dev/null && [ -e /usr/lib/libreoffice/program/unopkg.bin ]; then
    /usr/lib/libreoffice/program/unopkg sync -v --shared \
      "-env:BUNDLED_EXTENSIONS_USER=file:///usr/lib/libreoffice/share/prereg/bundled" \
      "-env:UserInstallation=file://$INSTDIR" \
      "-env:UNO_JAVA_JFW_INSTALL_DATA=file://$d/share/config/javasettingsunopkginstall.xml" \
      "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
  fi
}


if [ "$1" = "triggered" ]; then
	for triggername in $2; do
		case "$triggername" in
			# new "bundled" extensions (since 3.3)
			"/usr/lib/libreoffice/share/extensions")
			  sync_extensions
			;;
		esac
	done
fi