summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32c62ae2a7df4db307027d7cab7417082d8fbfbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Maintainer: jamazi <jamazi@tutanota.com>

pkgname=zig-completion-git
_pkgname=shell-completions
pkgver=gc5b387b
pkgrel=1
pkgdesc="Shell completions for the Zig compiler."
url="https://github.com/ziglang/shell-completions.git"
license=("MIT")
optdepends=('bash-completion: Bash completion support')
arch=("any")
source=("git+https://github.com/ziglang/${_pkgname}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  git describe --long --all | sed 's/.*-//'
}

package() {
  cd "${_pkgname}"

  install -Dm644 _zig         "${pkgdir}/usr/share/zsh/site-functions/_zig"
  install -Dm644 _zig.bash    "${pkgdir}/usr/share/bash-completion/completions/_zig"
}