2022-11-19 23:06:38 -06:00
|
|
|
name='bat'
|
2022-11-20 01:24:28 -06:00
|
|
|
version=VERSION
|
2023-07-30 13:40:59 -05:00
|
|
|
release=2
|
2022-11-19 23:06:38 -06:00
|
|
|
desc='A cat(1) clone with syntax highlighting and Git integration'
|
|
|
|
homepage='https://github.com/sharkdp/bat'
|
2022-11-22 01:53:50 -06:00
|
|
|
architectures=('amd64')
|
2022-11-20 00:12:51 -06:00
|
|
|
maintainer='SinTan1729'
|
2022-11-19 23:06:38 -06:00
|
|
|
license=('APACHE-2.0' 'MIT')
|
|
|
|
provides=('bat')
|
2022-11-20 00:44:11 -06:00
|
|
|
conflicts=('bat')
|
2022-11-20 14:48:47 -06:00
|
|
|
git_repo='sharkdp/bat'
|
2022-11-19 23:06:38 -06:00
|
|
|
|
|
|
|
sources=()
|
|
|
|
checksums=()
|
|
|
|
|
|
|
|
version() {
|
2023-09-12 16:57:10 -05:00
|
|
|
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
|
2022-11-19 23:06:38 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-11-21 23:57:28 -06:00
|
|
|
# Pull sources
|
|
|
|
echo Pulling ${name} ${version}
|
2022-11-22 00:52:56 -06:00
|
|
|
curl -L "https://github.com/${git_repo}/releases/latest/download/${name}-${version}-x86_64-unknown-linux-musl.tar.gz" -o ${name}.tar.gz
|
2022-11-21 23:57:28 -06:00
|
|
|
# Build package
|
|
|
|
echo Creating the package
|
|
|
|
tar -xzf "${name}.tar.gz" -C .
|
|
|
|
cd "./${name}-${version}-x86_64-unknown-linux-musl"
|
|
|
|
# Binary
|
2023-09-12 16:57:10 -05:00
|
|
|
install-binary "./${name}"
|
2022-11-21 23:57:28 -06:00
|
|
|
# Manpage
|
2023-09-12 16:57:10 -05:00
|
|
|
install-manual "./${name}.1"
|
2022-11-21 23:57:28 -06:00
|
|
|
# Autocomplete
|
2023-09-12 16:58:58 -05:00
|
|
|
install-completion fish ${name} <"./autocomplete/${name}.fish"
|
|
|
|
install-completion zsh ${name} <"./autocomplete/${name}.zsh"
|
|
|
|
install-completion bash ${name} <"./autocomplete/${name}.bash"
|
2022-11-19 23:06:38 -06:00
|
|
|
}
|