diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/vi/vi.install | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core/vi/vi.install')
-rw-r--r-- | abs/core/vi/vi.install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/core/vi/vi.install b/abs/core/vi/vi.install new file mode 100644 index 0000000..ebb73c0 --- /dev/null +++ b/abs/core/vi/vi.install @@ -0,0 +1,37 @@ +post_install() { + # if we have vim installed create view/rview symlinks to vim + if [ ! -f usr/bin/vim ] ; then + cd usr/bin + ln -s vi view + ln -s vi rview + cd ${OLDPWD} + echo "Create vi 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." +} + +pre_remove() { + # if vi is a binary instead of a symlink we have an intact gvim installation + # with a different binary/symlink structure + # we recover what pacmans database knows about Vim + if [ ! -f usr/bin/vim ] ; then + rm -f usr/bin/view usr/bin/rview + echo "Remove vi related symlinks ..." + fi +} + +post_upgrade() { + post_install $1 +} + +pre_upgrade() { + pre_remove $2 +} + + +op=$1 +shift +[ "$(type -t "$op")" = "function" ] && $op "$@" |