summaryrefslogtreecommitdiffstats
path: root/gvim/gvim.install
blob: f52c82ef48c03ef0fcf34c2d2470eefdafc90a47 (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
34
35
36
37
38
39
40
41
42
43
post_install() {

  echo "Create gvim related symlinks..."
  cd usr/bin
  rm -f vim
  ln -sf vim-big vim
  cd ${OLDPWD}

  echo "Updating desktop and mime database..."
  update-desktop-database -q
  echo -n "Updating vim help tags..."
  usr/bin/vim --noplugins -u NONE -U NONE \
    --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
  echo "done."
}

post_upgrade() {
  post_install $1
}

post_remove() {
  # we recover what pacmans database knows about gvim
  # is vim installed and well?
  if [ -f usr/bin/vim-normal ] ; then
    cd usr/bin
    rm -f vim
    ln -sf vim-normal vim
    cd ${OLDPWD}
    echo "Recover vim related symlinks ..."
  else
    # Should never be the case because gvim depends on vim
    rm -f usr/bin/vim
  fi
  echo -n "Updating desktop and mime database..."
  update-desktop-database
  echo "done."
}

op=$1
shift
[ "$(type -t "$op")" = "function" ] && $op "$@"

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