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 "$@"