From d9e81941e70518c33491d8c0123dfe629afacb27 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 23 May 2022 20:49:30 +0200 Subject: [PATCH] Added shell completion --- .SRCINFO | 1 + PKGBUILD | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index cc0a665..fc325c1 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -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 diff --git a/PKGBUILD b/PKGBUILD index 88c0e5a..8a00178 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -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" }