lure-repo/fzf/lure.sh

52 lines
2.3 KiB
Bash
Raw Normal View History

2022-11-22 00:38:17 -06:00
name='fzf'
version=VERSION
2024-07-10 17:51:04 -05:00
release=3
2022-11-22 00:38:17 -06:00
desc='A command-line fuzzy finder'
homepage='https://github.com/junegunn/fzf'
2022-11-22 01:53:50 -06:00
architectures=('amd64' 'arm')
2022-11-22 00:38:17 -06:00
maintainer='SinTan1729'
license=('MIT')
provides=('fzf' 'fzf-tmux')
conflicts=('fzf' 'fzf-tmux')
git_repo='junegunn/fzf'
sources=()
checksums=()
version() {
2023-07-28 02:03:27 -05:00
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
2022-11-22 00:38:17 -06:00
}
package() {
# Pull sources
2022-11-22 17:37:15 -06:00
echo "Pulling ${name} ${version}"
2024-07-10 17:53:36 -05:00
curl -L "https://github.com/${git_repo}/releases/latest/download/fzf-${version:1}-linux_amd64.tar.gz" -o ${name}.tar.gz
2024-07-10 17:51:04 -05:00
# curl -L "https://raw.githubusercontent.com/${git_repo}/master/bin/${name}-tmux" -o ${name}-tmux
2022-11-22 00:38:17 -06:00
curl -L "https://raw.githubusercontent.com/${git_repo}/master/man/man1/${name}.1" -o ${name}.1
2024-07-10 17:51:04 -05:00
# curl -L "https://raw.githubusercontent.com/${git_repo}/master/man/man1/${name}-tmux.1" -o ${name}-tmux.1
2022-11-22 00:38:17 -06:00
curl -L "https://raw.githubusercontent.com/${git_repo}/master/shell/completion.bash" -o ${name}.bash
curl -L "https://raw.githubusercontent.com/${git_repo}/master/shell/completion.zsh" -o ${name}.zsh
curl -L "https://raw.githubusercontent.com/${git_repo}/master/shell/key-bindings.bash" -o key-bindings.zsh
curl -L "https://raw.githubusercontent.com/${git_repo}/master/shell/key-bindings.zsh" -o key-bindings.bash
curl -L "https://raw.githubusercontent.com/${git_repo}/master/shell/key-bindings.fish" -o key-bindings.fish
# Build package
2022-11-22 17:37:15 -06:00
echo "Creating the package"
2022-11-22 00:38:17 -06:00
tar -xzf "${name}.tar.gz" -C .
# Binaries
install-binary "./${name}"
2024-07-10 17:51:04 -05:00
# install-binary "./${name}-tmux"
2022-11-22 00:38:17 -06:00
# Manpages
install-manual "./${name}.1"
2024-07-10 17:51:04 -05:00
# # install-manual "./${name}-tmux.1"
2022-11-22 00:38:17 -06:00
# Autocomplete
install-completion zsh "${name}" <"./${name}.zsh"
install-completion bash "${name}" <"./${name}.bash"
2022-11-22 00:38:17 -06:00
# Key-bindings
2023-07-28 02:03:27 -05:00
command -v fish &>/dev/null && install -Dm644 key-bindings.fish "${pkgdir}/usr/share/fish/vendor_functions.d/${name}_key_bindings.fish"
command -v bash &>/dev/null && install -Dm644 key-bindings.bash "${pkgdir}/usr/share/${name}/key-bindings.bash"
command -v zsh &>/dev/null && install -Dm644 key-bindings.zsh "${pkgdir}/usr/share/${name}/key-bindings.zsh"
2022-11-22 17:03:16 -06:00
# Notice
2022-11-22 17:37:15 -06:00
echo "For key-binding and completion to work with fish, some manual intervention is required"
echo "Look here for instructions: https://wiki.archlinux.org/title/fzf#fish"
2022-11-22 00:38:17 -06:00
}