From 2151c7af80b35c0e7456527121425b41c35e4e39 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 28 Jan 2020 11:33:51 +0100 Subject: [PATCH] warn when directories found that hold shell completions. This will warn then paths for certain shells that have completions are found and tell the user to add a subpackage for it. In a future date we also want to warn the user to move certain directories where packages have completions to those directories so our default_ functions can move them without problems --- abuild.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/abuild.in b/abuild.in index 38e6993..f39c49a 100644 --- a/abuild.in +++ b/abuild.in @@ -838,6 +838,19 @@ prepare_subpackages() { warning "Found /usr/share/locale" warning2 "Maybe add \$pkgname-lang to subpackages?" fi + # post check for shell completions + if [ -d "$pkgdir"/usr/share/bash-completion ]; then + warning "Found /usr/share/bash-completion" + warning2 "Add \$pkgname-bash-completion to subpackages" + fi + if [ -d "$pkgdir"/usr/share/zsh/site-functions ]; then + warning "Found /usr/share/zsh/site-functions" + warning2 "Add \$pkgname-zsh-completion to subpackages" + fi + if [ -d "$pkgdir"/usr/share/fish/completions ]; then + warning "Found /usr/share/fish/completions" + warning2 "Add \$pkgname-fish-completion to subpackages" + fi } default_lang() { @@ -1923,7 +1936,7 @@ default_bashcomp() { install_if="$pkgname=$pkgver-r$pkgrel bash-completion" cd "$pkgdir" || return 0 - amove /usr/share/bash-completion/completions + amove usr/share/bash-completion/completions } bashcomp() {