commit: c93bef065a6f21f9833bfcd249e53481684574ef
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 15:55:50 2017 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Oct 23 08:13:56 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c93bef06
vim-plugin.eclass: add missing dies.
eclass/vim-plugin.eclass | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index cbf71e2917a..1bfcde9d580 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
}