summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 587a9156c5013c84f3b0cedc7e9faa00830d9293 (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
27
# Maintainer: mzwing <mzwing@mzwing.eu.org>

pkgname=hfd-git
pkgver=r30.258f20e
pkgrel=1
pkgdesc='CLI-Tool for download Huggingface models and datasets with aria2/wget+git'
arch=('any')
url='https://gist.github.com/padeoe/697678ab8e528b85a2a7bddafea1fa4f'
license=('unknown')
depends=('bash' 'git' 'git-lfs')
optdepends=('aria2: Optional download tool for hfd. At least one optional download tool must be installed.'
            'wget: Optional download tool for hfd. At least one optional download tool must be installed.')
provides=('hfd')
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  ( set -o pipefail
    git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

package() {
  install -Dm755 "$srcdir/$pkgname/hfd.sh" "$pkgdir/usr/bin/hfd"
}