#!/usr/bin/env bash # shellcheck disable=SC2034,SC2154,SC2164 # Maintainer: Cezary Drożak # Contributor: Alec Mev pkgname=asdf-vm pkgver=0.9.0 pkgrel=1 pkgdesc='Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more' arch=('any') url='https://asdf-vm.com' license=('MIT') depends=('git' 'curl') optdepends=( 'bash-completion: For completions to work in Bash' 'unzip: Needed by some plugins, like asdf-elixir' ) postinst=postinst source=( "$pkgname-$pkgver.tar.gz::https://github.com/asdf-vm/asdf/archive/v$pkgver.tar.gz" ) sha256sums=( 'f2ab54bf1d17e10f17e405c2fac29f0620a66b5c7a5200b5699e50e28ed210c8' ) package() { optdir="$pkgdir/opt/asdf-vm" cd "asdf-$pkgver" # Install files for sourcing for file in asdf.{elv,fish,sh}; do install -Dm644 "$file" "$optdir/$file" done # Install the main script install -Dm755 bin/asdf "$optdir/bin/asdf" # Install lib files find lib \ -type f \ -exec install -Dm644 {} "$optdir/{}" \; # Install completions install -Dm644 completions/_asdf "$pkgdir/usr/share/zsh/site-functions/_asdf" install -Dm644 completions/asdf.bash "$pkgdir/usr/share/bash-completion/completions/asdf" install -Dm644 completions/asdf.fish "$pkgdir/usr/share/fish/vendor_completions.d/asdf.fish" # Install documentation ( cd docs find . \ -type f \ -name '*.md' \ -exec install -Dm644 {} "$pkgdir/usr/share/doc/$pkgname/{}" \; ) }