summarylogtreecommitdiffstats
path: root/voikko-libreoffice.install
blob: df741e30174529b02e076db1a45c35b39d5f59ac (plain)
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
pre_install() {
  echo ">>> Removing old voikko extensions..."
  id=" "
  while [ "$id" != ""  ]; do
    id=`/usr/lib/libreoffice/program/unopkg list --shared | egrep '^(Name|Identifier):.*voikko' | cut -d":" -f2 | head -n 1`
    if [ "$id" != "" ]; then
      if /usr/lib/libreoffice/program/unopkg list --shared $id >/dev/null; then
        echo "Removing extension $id..."
        INSTDIR=`mktemp -d`
        /usr/lib/libreoffice/program/unopkg remove --shared $id
       fi
    fi
  done
}

post_install() {
  echo ">>> Adding extension /usr/lib/libreoffice/share/extensions/install/voikko.oxt..."
  /usr/lib/libreoffice/program/unopkg add --shared /usr/lib/libreoffice/share/extensions/install/voikko.oxt
}

pre_upgrade() {
  pre_install $1
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  pre_install $1
}

# vim:set ts=2 sw=2 et: