From 645ee55180b1d8e1ee169b56fdf011f6a1cae308 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 20 Nov 2022 02:37:22 -0600 Subject: [PATCH] Add script for lf --- lf/lure.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lf/lure.sh diff --git a/lf/lure.sh b/lf/lure.sh new file mode 100644 index 0000000..6983bd5 --- /dev/null +++ b/lf/lure.sh @@ -0,0 +1,27 @@ +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() { + printf "$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep -Eo '"tag_name": "(r.*)"' | sed -E 's/.*"([^"]+)".*/\1/')" +} + +package() { + vers="$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep -Eo '"tag_name": "(r.*)"' | sed -E 's/.*"([^"]+)".*/\1/')" + echo Installing ${name} ${vers} + curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-linux-${architecture}.tar.gz" -o ${name}.tar.gz + tar xzf "${name}.tar.gz" -C . + install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" +} + \ No newline at end of file