add shell completion scripts

This commit is contained in:
Adam Chovanec 2025-09-11 21:49:14 +02:00
parent 2814920547
commit d97dc9bad2
2 changed files with 10 additions and 3 deletions

View file

@ -1,7 +1,7 @@
pkgbase = grype-bin
pkgdesc = A vulnerability scanner for container images and filesystems.
pkgver = 0.99.1
pkgrel = 1
pkgrel = 2
url = https://github.com/anchore/grype
arch = x86_64
license = Apache-2.0

View file

@ -3,7 +3,7 @@
# Ex-Maintainer: Ray Del Rosario <michael@raydelrosario.com>
pkgname='grype-bin'
pkgver=0.99.1
pkgrel=1
pkgrel=2
pkgdesc='A vulnerability scanner for container images and filesystems.'
url='https://github.com/anchore/grype'
arch=('x86_64')
@ -11,5 +11,12 @@ license=('Apache-2.0')
source=("https://github.com/anchore/grype/releases/download/v${pkgver}/grype_${pkgver}_linux_amd64.tar.gz")
sha256sums=('7fde4d45fe097daa2554078cd9e81faa43e51266a888337f5446c1ffc42d451f')
package() {
install -Dm755 "$srcdir/grype" "${pkgdir}/usr/bin/grype"
"$srcdir/grype" completion zsh > "$srcdir/zsh_grype"
"$srcdir/grype" completion fish > "${srcdir}/fish_grype"
"$srcdir/grype" completion bash > "$srcdir/bash_grype"
install -D -m 0755 "$srcdir/grype" "${pkgdir}/usr/bin/grype"
install -D -m 0644 "$srcdir/zsh_grype" "$pkgdir/usr/share/zsh/site-functions/_grype"
install -D -m 0644 "${srcdir}/fish_grype" "${pkgdir}/usr/share/fish/completions/grype.fish"
install -D -m 0644 "$srcdir/bash_grype" "$pkgdir/usr/share/bash-completion/completions/grype"
}