1
0
Fork 0
mirror of https://github.com/SinTan1729/aur-packages.git synced 2024-12-27 00:18:37 -06:00

Auto place completions

This commit is contained in:
Sayantan Santra 2022-12-01 17:00:36 -06:00
parent 1d29a3b640
commit e3814cbea9

View file

@ -2,7 +2,7 @@
pkgname="topgrade-bin" pkgname="topgrade-bin"
_pkgname="topgrade" _pkgname="topgrade"
pkgver=10.2.1 pkgver=10.2.1
pkgrel=1 pkgrel=2
pkgdesc="Invoke the upgrade procedure of multiple package managers" pkgdesc="Invoke the upgrade procedure of multiple package managers"
arch=('x86_64' 'aarch64' 'armv7') arch=('x86_64' 'aarch64' 'armv7')
url='https://github.com/topgrade-rs/topgrade' url='https://github.com/topgrade-rs/topgrade'
@ -21,4 +21,17 @@ package() {
# manpage # manpage
mkdir -p "$pkgdir/usr/local/man/man8" mkdir -p "$pkgdir/usr/local/man/man8"
./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' > "$pkgdir/usr/local/man/man8/topgrade.8" ./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' > "$pkgdir/usr/local/man/man8/topgrade.8"
# completions
if $(command -v fish &> /dev/null); then
mkdir -p "${pkgdir}/usr/share/fish/completions/"
./topgrade --gen-completion fish > "${pkgdir}/usr/share/fish/completions/topgrade.fish"
fi
if $(command -v bash &> /dev/null); then
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
./topgrade --gen-completion bash > "${pkgdir}/usr/share/bash-completion/completions/topgrade"
fi
if $(command -v zsh &> /dev/null); then
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
./topgrade --gen-completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_topgrade"
fi
} }