/[gentoo-x86]/eclass/vim-doc.eclass
Gentoo

Diff of /eclass/vim-doc.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.11
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-doc.eclass,v 1.10 2005/12/07 17:53:25 ciaranm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-doc.eclass,v 1.11 2006/09/24 19:41:56 pioto Exp $
4# 4#
5# This eclass is used by vim.eclass and vim-plugin.eclass to update 5# This eclass is used by vim.eclass and vim-plugin.eclass to update
6# the documentation tags. This is necessary since vim doesn't look in 6# the documentation tags. This is necessary since vim doesn't look in
7# /usr/share/vim/vimfiles/doc for documentation; it only uses the 7# /usr/share/vim/vimfiles/doc for documentation; it only uses the
8# versioned directory, for example /usr/share/vim/vim62/doc 8# versioned directory, for example /usr/share/vim/vim62/doc
14 14
15update_vim_helptags() { 15update_vim_helptags() {
16 local vimfiles vim d s 16 local vimfiles vim d s
17 17
18 # This is where vim plugins are installed 18 # This is where vim plugins are installed
19 vimfiles=/usr/share/vim/vimfiles 19 vimfiles="${ROOT}"/usr/share/vim/vimfiles
20 20
21 if [[ $PN != vim-core ]]; then 21 if [[ $PN != vim-core ]]; then
22 # Find a suitable vim binary for updating tags :helptags 22 # Find a suitable vim binary for updating tags :helptags
23 if use ppc-macos ; then 23 if use ppc-macos ; then
24 vim=$(which gvim 2>/dev/null ) 24 vim=$(which gvim 2>/dev/null )
39 vim="${T}/tagvim" 39 vim="${T}/tagvim"
40 fi 40 fi
41 41
42 # Install the documentation symlinks into the versioned vim 42 # Install the documentation symlinks into the versioned vim
43 # directory and run :helptags 43 # directory and run :helptags
44 for d in /usr/share/vim/vim[0-9]*; do 44 for d in "${ROOT}"/usr/share/vim/vim[0-9]*; do
45 [[ -d "$d/doc" ]] || continue # catch a failed glob 45 [[ -d "$d/doc" ]] || continue # catch a failed glob
46 46
47 # Remove links, and possibly remove stale dirs 47 # Remove links, and possibly remove stale dirs
48 find $d/doc -name \*.txt -type l | while read s; do 48 find $d/doc -name \*.txt -type l | while read s; do
49 [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s" 49 [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20