summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2019-09-27 15:57:39 +0200
committerManuel Rüger <mrueg@gentoo.org>2019-09-27 15:57:59 +0200
commit01820f7b217964d4d23d13430bf55fb53cb580f7 (patch)
treefdab37387fff8c51f3fed24d6c4289411bef6a54
parentapp-text/po4a: drop old (diff)
downloadgentoo-01820f7b217964d4d23d13430bf55fb53cb580f7.tar.gz
gentoo-01820f7b217964d4d23d13430bf55fb53cb580f7.tar.bz2
gentoo-01820f7b217964d4d23d13430bf55fb53cb580f7.zip
app-emulation/cri-tools: Install shell completions
Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Manuel Rüger <mrueg@gentoo.org>
-rw-r--r--app-emulation/cri-tools/cri-tools-1.16.1.ebuild9
1 files changed, 8 insertions, 1 deletions
diff --git a/app-emulation/cri-tools/cri-tools-1.16.1.ebuild b/app-emulation/cri-tools/cri-tools-1.16.1.ebuild
index a298fcbf5cbf..2ffbd0494217 100644
--- a/app-emulation/cri-tools/cri-tools-1.16.1.ebuild
+++ b/app-emulation/cri-tools/cri-tools-1.16.1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit golang-build golang-vcs-snapshot
+inherit golang-build golang-vcs-snapshot bash-completion-r1
EGO_PN="github.com/kubernetes-sigs/cri-tools"
MY_PV="v${PV/_beta/-beta.}"
@@ -21,9 +21,16 @@ RESTRICT="test"
src_compile() {
GOPATH="${S}" go test -c -v -ldflags="-X ${EGO_PN}/pkg/version.Version=${MY_PV}" -o bin/critest ${EGO_PN}/cmd/critest || die
GOPATH="${S}" go build -v -ldflags="-X ${EGO_PN}/pkg/version.Version=${MY_PV}" -o bin/crictl ${EGO_PN}/cmd/crictl || die
+ bin/crictl completion bash > ${PN}.bash || die
+ bin/crictl completion zsh > ${PN}.zsh || die
}
src_install() {
dobin bin/*
+
+ newbashcomp ${PN}.bash ${PN}
+ insinto /usr/share/zsh/site-functions
+ newins ${PN}.zsh _${PN}
+
dodoc -r src/${EGO_PN}/{docs,{README,RELEASE,CHANGELOG,CONTRIBUTING}.md}
}