lure-repo/lf/lure.sh

27 lines
850 B
Bash
Raw Normal View History

2022-11-20 02:37:22 -06:00
name='lf'
version=VERSION
release=1
desc='A terminal file manager written in Go'
homepage='https://github.com/gokcehan/lf'
architectures=('amd64')
maintainer='SinTan1729'
license=('MIT')
provides=('lf')
conflicts=('lf')
git_repo="gokcehan/lf"
sources=()
checksums=()
version() {
2022-11-20 02:40:25 -06:00
printf "$(curl --silent "https://api.github.com/repos/${git_repo}/releases/latest" | grep -Eo '"tag_name": "(r.*)"' | sed -E 's/.*"([^"]+)".*/\1/')"
2022-11-20 02:37:22 -06:00
}
package() {
2022-11-20 02:40:25 -06:00
vers="$(curl --silent "https://api.github.com/repos/${git_repo}/releases/latest" | grep -Eo '"tag_name": "(r.*)"' | sed -E 's/.*"([^"]+)".*/\1/')"
2022-11-20 02:37:22 -06:00
echo Installing ${name} ${vers}
2022-11-20 02:51:25 -06:00
curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-linux-${architectures}.tar.gz" -o ${name}.tar.gz
2022-11-20 02:37:22 -06:00
tar xzf "${name}.tar.gz" -C .
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
}