summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2003-08-22 16:03:07 +0000
committerAron Griffis <agriffis@gentoo.org>2003-08-22 16:03:07 +0000
commit7229a7e42d3192f8d2e9667d5ab631f0357259b1 (patch)
tree5a2e87efc4dc4ac6d8fd68dbcddb784146d3261c /eclass
parentSquashing bug 27119 (diff)
downloadgentoo-2-7229a7e42d3192f8d2e9667d5ab631f0357259b1.tar.gz
gentoo-2-7229a7e42d3192f8d2e9667d5ab631f0357259b1.tar.bz2
gentoo-2-7229a7e42d3192f8d2e9667d5ab631f0357259b1.zip
prevent warning messages regarding /usr/share/vim/vimfiles/after
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vim-plugin.eclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 9963d194d692..b16978fde93d 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim-plugin.eclass,v 1.2 2003/08/03 21:06:55 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim-plugin.eclass,v 1.3 2003/08/22 16:03:07 agriffis Exp $
#
# This eclass simplifies installation of app-vim plugins into
# /usr/share/vim/vimfiles. This is a version-independent directory
@@ -60,8 +60,13 @@ vim-plugin_pkg_postrm() {
# /usr/share/vim/vimfiles/after/* comprised of the snippets in
# /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
+ local d f afterdir=/usr/share/vim/vimfiles/after
+
+ # Nothing to do if the dir isn't there
+ [ -d ${afterdir} ] || return 0
+
einfo "Updating scripts in /usr/share/vim/vimfiles/after"
- find /usr/share/vim/vimfiles/after -type d -name \*.vim.d | \
+ find ${afterdir} -type d -name \*.vim.d | \
while read d; do
echo '" Generated by update_vim_afterscripts' > "${d%.d}"
find "${d}" -name \*.vim -type f -maxdepth 1 -print0 | \
@@ -69,7 +74,7 @@ update_vim_afterscripts() {
done
einfo "Removing dead scripts in /usr/share/vim/vimfiles/after"
- find /usr/share/vim/vimfiles/after -type f -name \*.vim | \
+ find ${afterdir} -type f -name \*.vim | \
while read f; do
[[ "$(head -n 1 ${f})" == '" Generated by update_vim_afterscripts' ]] \
|| continue