Added shell completion

main
Jef Roosens 2022-05-23 20:49:30 +02:00
parent b102b5122a
commit d9e81941e7
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,7 @@ pkgbase = packwiz-git
url = https://github.com/packwiz/packwiz
arch = x86_64
license = MIT
makedepends = git
makedepends = go
depends = glibc
source = packwiz-git::git+https://github.com/packwiz/packwiz#branch=master

View File

@ -11,7 +11,7 @@ url='https://github.com/packwiz/packwiz'
license=('MIT')
depends=('glibc')
makedepends=('go')
makedepends=('git' 'go')
source=("${pkgname}::git+https://github.com/packwiz/packwiz#branch=master")
md5sums=('SKIP')
@ -28,9 +28,15 @@ pkgver() {
build() {
cd "${pkgname}"
go build -ldflags "-s -w"
go build -ldflags '-s -w'
}
package() {
install -Dm755 "${pkgname}/packwiz" "${pkgdir}/usr/bin/packwiz"
cd "${pkgname}"
install -Dm755 'packwiz' "${pkgdir}/usr/bin/packwiz"
./packwiz completion bash | install -Dm644 '/dev/stdin' "${pkgdir}/usr/share/bash-completion/completions/packwiz"
./packwiz completion zsh | install -Dm644 '/dev/stdin' "${pkgdir}/usr/share/zsh/site-functions/_packwiz"
./packwiz completion fish | install -Dm644 '/dev/stdin' "${pkgdir}/usr/share/fish/vendor_completions.d/packwiz.fish"
}