summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2021-03-19 02:53:22 +0600
committerGitHub2021-03-18 14:53:22 -0600
commit5d5d729fe3997e49f2245119f7ce21fdce009582 (patch)
tree467a0890c84aca06658b984b8ebf98d10429a8b7
parente6ec16404ca9d0cc7207900e0761bf9a1e8226b5 (diff)
downloadaur-5d5d729fe3997e49f2245119f7ce21fdce009582.tar.gz
install heroku completions properly. (#10)
Authored-by: ahmubashir
-rw-r--r--PKGBUILD11
1 files changed, 10 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ce263b9c1764..dddbb74c56e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
# Maintainer: Sampson Crowley <sampsonsprojects@gmail.com>
# Contributor: Rhys Kenwell <redrield+aur@gmail.com>
# Github Contributor: Michael Herold <https://github.com/michaelherold>
+# Github Contributor: ahmubashir <https://github.com/amubashir>
pkgname=heroku-cli
pkgver=7.50.0
-pkgrel=1
+pkgrel=2
_builddir=cli-$pkgver-$pkgrel
pkgdesc="CLI to manage Heroku apps and services with forced auto-update removed"
arch=('any')
@@ -108,6 +109,14 @@ package() {
herokuinstallperm=$(stat -c "%a" "$foundherokufile")
herokuinstallfile="${foundherokufile/$srcdir/$herokulibdir}"
install -Dm$herokuinstallperm "$foundherokufile" "$herokuinstallfile"
+ case $foundherokufile in
+ (*/plugin-autocomplete/autocomplete/bash/*.bash)
+ _complete_target="${foundherokufile##*/}"
+ install -Dm644 "$foundherokufile" "$pkgdir/usr/share/bash-completion/completions/${_complete_target%.*}"
+ unset _complete_target;;
+ (*/plugin-autocomplete/autocomplete/zsh/_*)
+ install -Dm644 "$foundherokufile" "$pkgdir/usr/share/zsh/site-functions/${foundherokufile##*/}";;
+ esac
done
ln -sf "../../../lib/heroku/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"