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 url = https://github.com/packwiz/packwiz
arch = x86_64 arch = x86_64
license = MIT license = MIT
makedepends = git
makedepends = go makedepends = go
depends = glibc depends = glibc
source = packwiz-git::git+https://github.com/packwiz/packwiz#branch=master 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') license=('MIT')
depends=('glibc') depends=('glibc')
makedepends=('go') makedepends=('git' 'go')
source=("${pkgname}::git+https://github.com/packwiz/packwiz#branch=master") source=("${pkgname}::git+https://github.com/packwiz/packwiz#branch=master")
md5sums=('SKIP') md5sums=('SKIP')
@ -28,9 +28,15 @@ pkgver() {
build() { build() {
cd "${pkgname}" cd "${pkgname}"
go build -ldflags "-s -w" go build -ldflags '-s -w'
} }
package() { 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"
} }