lure-repo/lsd/lure.sh

37 lines
1.3 KiB
Bash
Raw Normal View History

2022-11-20 00:46:24 -06:00
name='lsd'
2022-11-20 01:24:28 -06:00
version=VERSION
2022-11-20 00:46:24 -06:00
release=1
desc='The next gen ls command'
2022-11-20 00:51:53 -06:00
homepage='https://github.com/Peltoche/lsd'
2022-11-22 01:47:36 -06:00
architectures=('all')
2022-11-20 00:46:24 -06:00
maintainer='SinTan1729'
2022-11-20 00:49:05 -06:00
license=('APACHE-2.0')
2022-11-20 00:46:24 -06:00
provides=('lsd')
conflicts=('lsd')
2022-11-20 14:48:47 -06:00
git_repo='Peltoche/lsd'
2022-11-20 00:46:24 -06:00
sources=()
checksums=()
version() {
2022-11-22 00:59:31 -06:00
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
2022-11-20 00:46:24 -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
2022-11-20 00:46:24 -06:00
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
2022-11-21 23:57:28 -06:00
# Manpage
2022-11-20 00:46:24 -06:00
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
2022-11-21 23:57:28 -06:00
# Autocomplete
2022-11-20 15:03:42 -06:00
command -v fish &> /dev/null && install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
command -v zsh &> /dev/null && install -Dm644 "./autocomplete/_${name}" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
command -v bash &> /dev/null && install -Dm644 "./autocomplete/${name}.bash-completion" "${pkgdir}/usr/share/bash-completion/completions/${name}"
2022-11-20 00:46:24 -06:00
}