File: prerm

package info (click to toggle)
dmaths 3.2.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,180 kB
  • sloc: sh: 59; makefile: 41
file content (29 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
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
#!/bin/sh

set -e

flush_unopkg_cache() {
        /usr/lib/openoffice/program/unopkg list --shared "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1" > /dev/null 2>&1
}

remove_extension() {
  if /usr/lib/openoffice/program/unopkg list --shared $1 >/dev/null; then
    echo -n "Removing extension $1..."
    INSTDIR=`mktemp -d`
    /usr/lib/openoffice/program/unopkg remove --shared $1 \
      "-env:UserInstallation=file://$INSTDIR" \
      '-env:UNO_JAVA_JFW_INSTALL_DATA=$ORIGIN/../share/config/javasettingsunopkginstall.xml' \
      "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
    if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi
    echo " done."
    flush_unopkg_cache
  fi
}

case "$1" in
	remove)
		remove_extension Dmaths
	;;
esac

#DEBHELPER#