summaryrefslogtreecommitdiffstats
path: root/abs/extra/vim/vim.install
blob: 1d46e191b446a40ceb9bf0e8477e696777dcba96 (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
post_install() {
  # if we have an existing gvim installation - relocate binaries and symlinks
  if [ -f usr/bin/vim ] ; then
    cd usr/bin
    rm -f view rview
    ln -s vim view
    ln -s vim rview
    cd ${OLDPWD}
    echo "Create vim related symlinks..."
  fi
  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."
}

pre_remove() {
  cd usr/bin
  rm -f view rview
  if [ -f usr/bin/vi ] ; then
    ln -s vi view
    ln -s vi rview
    echo "Create vi related symlinks..."
  fi
  cd ${OLDPWD}
}

post_upgrade() {
  post_install $1
}

pre_upgrade() {
  pre_remove $2
}

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