summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-10-22 17:55:50 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-10-23 10:13:56 +0200
commitc93bef065a6f21f9833bfcd249e53481684574ef (patch)
treebf022f1f3372b53740469964af7abb4af16ec7a4
parentx11-libs/libXfont2: amd64 stable wrt bug #634044 (diff)
downloadgentoo-c93bef065a6f21f9833bfcd249e53481684574ef.tar.gz
gentoo-c93bef065a6f21f9833bfcd249e53481684574ef.tar.bz2
gentoo-c93bef065a6f21f9833bfcd249e53481684574ef.zip
vim-plugin.eclass: add missing dies.
-rw-r--r--eclass/vim-plugin.eclass28
1 files changed, 16 insertions, 12 deletions
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index cbf71e2917a5..1bfcde9d580b 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -49,10 +49,13 @@ vim-plugin_src_install() {
fi
# Remove unwanted files that may exist
- rm -rf .[^.] .??* Makefile*
+ ebegin "Clean up unwanted files"
+ rm -f .[^.] .??* Makefile* || die "unwanted files cleanup failed"
+ eend $?
# Install non-vim-help-docs
- cd "${S}"
+ cd "${S}" || die "couldn't cd in ${S}"
+ local f
for f in *; do
[[ -f "${f}" ]] || continue
if [[ "${f}" = *.html ]]; then
@@ -60,13 +63,14 @@ vim-plugin_src_install() {
else
dodoc "${f}"
fi
- rm -f "${f}"
+ rm "${f}" || die
done
# Install remainder of plugin
- cd "${WORKDIR}"
+ cd "${WORKDIR}" || die "couldn't cd in ${WORKDIR}"
dodir /usr/share/vim
- mv "${S}" "${ED}"/usr/share/vim/vimfiles
+ mv "${S}" "${ED}"/usr/share/vim/vimfiles || die \
+ "couldn't move ${S} to ${ED}/usr/share/vim/vimfiles"
# Fix remaining bad permissions
chmod -R -x+X "${ED}"/usr/share/vim/vimfiles/ || die "chmod failed"
@@ -97,7 +101,8 @@ vim-plugin_pkg_postrm() {
# Remove empty dirs; this allows
# /usr/share/vim to be removed if vim-core is unmerged
- find "${EPREFIX}/usr/share/vim/vimfiles" -depth -type d -exec rmdir {} \; 2>/dev/null
+ find "${EPREFIX}/usr/share/vim/vimfiles" -depth -type d -exec rmdir {} \; 2>/dev/null || \
+ die "rmdir failed"
}
# @FUNCTION: update_vim_afterscripts
@@ -113,11 +118,10 @@ update_vim_afterscripts() {
[ -d "${afterdir}" ] || return 0
einfo "Updating scripts in ${EPREFIX}/usr/share/vim/vimfiles/after"
- 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 | \
- sort -z | xargs -0 cat >> "${d%.d}"
+ find "${afterdir}" -type d -name \*.vim.d | while read d; do
+ echo '" Generated by update_vim_afterscripts' > "${d%.d}" || die
+ find "${d}" -name \*.vim -type f -maxdepth 1 -print0 | sort -z | \
+ xargs -0 cat >> "${d%.d}" || die "update_vim_afterscripts failed"
done
einfo "Removing dead scripts in ${EPREFIX}/usr/share/vim/vimfiles/after"
@@ -129,7 +133,7 @@ update_vim_afterscripts() {
# if there's no corresponding .d directory, or if the
# file's effectively empty
if [[ ! -d "${f}.d" || -z "$(grep -v '^"' "${f}")" ]]; then
- rm -f "${f}"
+ rm "${f}" || die
fi
done
}