diff options
author | Luc Khai Hai | 2022-06-22 05:58:26 +0900 |
---|---|---|
committer | GitHub | 2022-06-21 14:58:26 -0600 |
commit | 710c03185fed662a42096477c0563f5a7702276d (patch) | |
tree | 2d96528270be582ccea6fc0c7736e92fd624ffcb /PKGBUILD | |
parent | ae2f4a865f8cdcfbe3d4829e70316c8aea2f1249 (diff) | |
download | aur-710c03185fed662a42096477c0563f5a7702276d.tar.gz |
Simplify Packaging Logic (#14)
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 27 |
1 files changed, 7 insertions, 20 deletions
@@ -6,7 +6,7 @@ pkgname=heroku-cli pkgver=7.60.1 -pkgrel=1 +pkgrel=2 _commit_id="4e998800e9bde9b30d97e465f1e2c066c5734ff5" pkgdesc="CLI to manage Heroku apps and services with forced auto-update removed" arch=('any') @@ -100,25 +100,12 @@ package() { install -dm755 "$pkgdir/usr/bin" install -dm755 "$pkgdir/usr/share/licenses/$pkgname" - herokulibdir="$pkgdir/usr/lib" - for foundherokudir in $(find "$srcdir/heroku" -mindepth 1 -type d); do - herokuinstalldir="${foundherokudir/$srcdir/$herokulibdir}" - install -dm755 "$herokuinstalldir" - done - - for foundherokufile in $(find "$srcdir/heroku" -mindepth 1 -type f); do - 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 + cp -a "$srcdir/heroku" "$pkgdir/usr/lib" + + # completions + local autocompletedir="$srcdir/heroku/node_modules/@heroku-cli/plugin-autocomplete/autocomplete" + install -Dm644 "$autocompletedir/bash/heroku.bash" "$pkgdir/usr/share/bash-completion/completions/heroku" + install -Dm644 "$autocompletedir/zsh/_heroku" "$pkgdir/usr/share/zsh/site-functions/_heroku" ln -sf "../../../lib/heroku/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" ln -sf "../lib/heroku/bin/run" "$pkgdir/usr/bin/heroku" |