commit d109640e962f41ca6f585843762a0992a5ae69ac Author: SinTan1729 Date: Sat Nov 19 23:06:38 2022 -0600 Initial commit diff --git a/bat/lure.sh b/bat/lure.sh new file mode 100644 index 0000000..b958a3b --- /dev/null +++ b/bat/lure.sh @@ -0,0 +1,28 @@ +name='bat' +version=auto +release=1 +desc='A cat(1) clone with syntax highlighting and Git integration' +homepage='https://github.com/sharkdp/bat' +architectures=('all') +license=('APACHE-2.0' 'MIT') +provides=('bat') +conflicts=('bat') + +sources=() +checksums=() + +version() { + printf "$(curl --silent "https://api.github.com/repos/sharkdp/bat/releases/latest" | grep -Eo '"tag_name": "v(.*)"' | sed -E 's/.*"([^"]+)".*/\1/')" +} + +package() { + curl -sL "https://github.com/sharkdp/bat/releases/download/$version/bat-$version-x86_64-unknown-linux-musl.tar.gz" -o bat.tar.gz + tar xzvf "bat.tar.gz" -C . + cd "./bat-$version-x86_64-unknown-linux-musl" + install -Dm755 "./bat" "${pkgdir}/usr/local/bin/bat" + install -Dm644 "./bat.1" "${pkgdir}/usr/local/share/man/man1/bat.1" + install -Dm644 "./autocomplete/bat.fish" "/usr/share/fish/completions/bat.fish" + install -Dm644 "./autocomplete/bat.zsh" "/usr/share/zsh/site-functions/_bat" + install -Dm644 "./autocomplete/bat.bash" "/usr/share/bash-completion/completions/bat" +} +