summaryrefslogtreecommitdiffstats
path: root/vim/vim.install
blob: 0666b3b00aa95b4381061dd330e78390ff04e248 (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
post_install() {
  # if gvim is installed make vim a symlink to vim-big
  if [ -f usr/bin/vim-big ] ; then
    cd usr/bin
    rm -f vim
    ln -sf vim-big vim
    cd ${OLDPWD}
    echo "Create gvim related symlinks..."
  fi
  echo -n "Updating vi help tags..."
  usr/bin/vi --noplugins -u NONE -U NONE \
    --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
  echo "done."
}

post_remove() {
  # By all dependencies in the world, that shall never happen, because
  # gvim depends on vim ... but then there is always pacman -Rd ...

  # if gvim is installed make vim a symlink to vim-big
  if [ -f usr/bin/vim-big ] ; then
    cd usr/bin
    rm -f vim
    ln -sf vim-big vim
    cd ${OLDPWD}
    echo "Create gvim related symlinks..."
  fi
}

post_upgrade() {
  post_install $1
}


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