2022-11-20 02:37:22 -06:00
|
|
|
name='lf'
|
|
|
|
version=VERSION
|
2023-07-30 13:40:59 -05:00
|
|
|
release=2
|
2022-11-20 02:37:22 -06:00
|
|
|
desc='A terminal file manager written in Go'
|
|
|
|
homepage='https://github.com/gokcehan/lf'
|
2022-11-22 01:47:36 -06:00
|
|
|
architectures=('all')
|
2022-11-20 02:37:22 -06:00
|
|
|
maintainer='SinTan1729'
|
|
|
|
license=('MIT')
|
|
|
|
provides=('lf')
|
|
|
|
conflicts=('lf')
|
2022-11-20 14:48:47 -06:00
|
|
|
git_repo='gokcehan/lf'
|
2022-11-20 02:37:22 -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 02:37:22 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-11-21 23:57:28 -06:00
|
|
|
# Pull sources
|
2022-11-22 17:37:15 -06:00
|
|
|
echo "Pulling ${name} ${version}"
|
2022-11-22 00:52:56 -06:00
|
|
|
curl -L "https://github.com/${git_repo}/releases/latest/download/${name}-linux-${ARCH}.tar.gz" -o ${name}.tar.gz
|
2022-11-20 13:25:48 -06:00
|
|
|
curl -L "https://raw.githubusercontent.com/${git_repo}/master/${name}.1" -o ${name}.1
|
2023-09-12 17:12:43 -05:00
|
|
|
command -v fish &>/dev/null && curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.fish" -o ${name}.fish
|
|
|
|
command -v zsh &>/dev/null && curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.zsh" -o ${name}.zsh
|
|
|
|
command -v bash &>/dev/null && curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.bash" -o ${name}.bash
|
2022-11-21 23:57:28 -06:00
|
|
|
# Build package
|
2022-11-22 17:37:15 -06:00
|
|
|
echo "Creating the package"
|
2022-11-21 23:57:28 -06:00
|
|
|
tar -xzf "${name}.tar.gz" -C .
|
|
|
|
# Binary
|
2023-09-12 17:12:43 -05:00
|
|
|
install-binary "./${name}"
|
2022-11-21 23:57:28 -06:00
|
|
|
# Manpage
|
2023-09-12 17:12:43 -05:00
|
|
|
install-manual "./${name}.1"
|
2022-11-21 23:57:28 -06:00
|
|
|
# Autocomplete
|
2023-09-12 17:12:43 -05:00
|
|
|
install-completion fish "${name}" <"./${name}.fish"
|
|
|
|
install-completion zsh "${name}" <"./${name}.zsh"
|
|
|
|
install-completion bash "${name}" <"./${name}.bash"
|
2022-11-20 02:37:22 -06:00
|
|
|
}
|