summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 84299f1180a6b8cb2ee9ee14ccad30b94859905d (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
26
# Maintainer: Simon Legner <Simon.Legner@gmail.com
pkgname=cht.sh-git
pkgver=r586.c4c3a62
pkgrel=1
pkgdesc="The only cheat sheet you need (command line client for cheat.sh)"
arch=('any')
url='https://github.com/chubin/cheat.sh'
license=('MIT')
depends=('curl' 'xsel' 'rlwrap')
makedepends=('git')
source=("$pkgname::git+https://github.com/chubin/cheat.sh")
sha1sums=(SKIP)

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$pkgname"
  install -Dm755 "share/cht.sh.txt" "$pkgdir/usr/bin/cht.sh"
  install -Dm644 "share/bash_completion.txt" "$pkgdir/usr/share/bash-completion/completions/cht.sh"
  install -Dm644 "share/fish.txt" "$pkgdir/usr/share/fish/vendor_completions.d/cht.sh.fish"
  install -Dm644 "share/zsh.txt" "$pkgdir/usr/share/zsh/site-functions/_cht.sh"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}