summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhai96_2019-04-24 01:36:45 +0700
committerkhai96_2019-04-24 01:36:45 +0700
commit54febbcba2cd2f13d3037b3c673e4585abc53f81 (patch)
tree9170daec60496342d6122ed5e2198fa775be7570
parent6fac45ee42195190715a77fc50062241a359e4b3 (diff)
downloadaur-54febbcba2cd2f13d3037b3c673e4585abc53f81.tar.gz
enable cli completions for bash and zsh
-rw-r--r--PKGBUILD18
1 files changed, 18 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8e19216d8122..6de56e6d01b4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,10 +17,28 @@ source=(
)
sha512sums=(SKIP SKIP SKIP)
+build() {
+ cd "$srcdir"
+
+ # wapm completions
+ ./bin/wapm completions bash > wapm-bash-completions
+ ./bin/wapm completions zsh > wapm-zsh-completions
+}
+
package() {
cd "$srcdir"
+
+ # display logo
source logo.sh
+
+ # executable commands
install -Dm755 bin/wasmer "$pkgdir"/usr/bin/wasmer
install -Dm755 bin/wapm "$pkgdir"/usr/bin/wapm
+
+ # wapm completions
+ install -Dm644 wapm-bash-completions "$pkgdir"/usr/share/bash-completion/completions/wapm
+ install -Dm644 wapm-zsh-completions "$pkgdir"/usr/share/zsh/site-functions/_wapm
+
+ # license
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}