From eef80a050faee64aab36e196e1c02d44cc82b2e8 Mon Sep 17 00:00:00 2001 From: Hauke Stieler Date: Sun, 16 Mar 2025 11:33:50 +0100 Subject: [PATCH] Generate and install shell completion files --- PKGBUILD | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 8cdf72b1fc73..eb31d51338ae 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,16 +1,15 @@ # Maintainer: Hauke Stieler pkgname=wiki2book -pkgver=0.3.0 +pkgver=0.4.0 pkgrel=1 pkgdesc="Wiki2book is a CLI tool to convert one or multiple Wikipedia articles into an eBook." arch=("any") url="https://github.com/hauke96/wiki2book" license=("GPL-3.0") -depends=("imagemagick") +depends=("imagemagick" "pandoc") optdepends=( "ttf-dejavu: Font used in the default style" - "pandoc: Used as one possible way to create EPUB files" "librsvg: Tool used to convert SVGs into raster images") makedepends=("go>=1.22") backup=() @@ -32,6 +31,10 @@ build() { # Build wiki2book and place it into the current working dir. ./build.sh -o linux -a $CARCH -f wiki2book-bin + + ./wiki2book-bin completion bash > wiki2book-completion-bash + ./wiki2book-bin completion fish > wiki2book-completion-fish + ./wiki2book-bin completion zsh > wiki2book-completion-zsh } package() { @@ -41,4 +44,8 @@ package() { install -d "${pkgdir}"/usr/share/wiki2book/ install -Dm644 wiki2book/configs/* "${pkgdir}"/usr/share/wiki2book/ + + install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/bash-completion/completions/wiki2book + install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/fish/vendor_completions.d/wiki2book.fish + install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/zsh/site-functions/_wiki2book }