Skip to content

Commit

Permalink
app-emulation/cri-tools: Install shell completions
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Manuel Rüger <[email protected]>
  • Loading branch information
mrueg committed Sep 27, 2019
1 parent 2dc83a3 commit 01820f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app-emulation/cri-tools/cri-tools-1.16.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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.}"
Expand All @@ -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}
}

0 comments on commit 01820f7

Please sign in to comment.