Skip to content

Instantly share code, notes, and snippets.

@avbop
Created May 22, 2021 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avbop/d673648e891120dbf54111cdd12c6013 to your computer and use it in GitHub Desktop.
Save avbop/d673648e891120dbf54111cdd12c6013 to your computer and use it in GitHub Desktop.
# Maintainer: Alexandria <alxpettit@gmail.com>
_pkgname=vim-fish
pkgname=${_pkgname}-git
pkgver=20200322.8b20c17
pkgrel=1
pkgdesc='VIM runtime files for FISH stuff'
url='https://github.com/blankname/vim-fish'
arch=('any')
license=('custom:MIT')
makedepends=('git')
source=("${_pkgname}::git+https://github.com/blankname/${_pkgname}.git")
sha1sums=('SKIP')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
pkgver() {
cd "${srcdir}/${_pkgname}"
git log -1 --format='%cd.%h' --date=short | tr -d -
}
package() {
cd "${srcdir}/${_pkgname}"
rm .git -rf
mkdir -p "${pkgdir}/usr/share/vim/vimfiles"
cp -av . "${pkgdir}/usr/share/vim/vimfiles"
}
@lmartinez-mirror
Copy link

I would change the pkgver() function to conform to Arch Linux's packaging guidelines for VCS packages.

printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

instead of line 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment