lure-repo/croc/lure.sh

35 lines
1 KiB
Bash
Raw Normal View History

2023-01-13 14:27:42 -06:00
name='croc'
version=VERSION
2023-07-30 13:40:59 -05:00
release=2
2023-01-13 14:27:42 -06:00
desc='Easily and securely send things from one computer to another'
homepage='https://github.com/schollz/croc'
architectures=('amd64')
maintainer='SinTan1729'
license=('MIT')
provides=('croc')
conflicts=('croc')
git_repo='schollz/croc'
sources=()
checksums=()
version() {
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
2023-01-13 14:27:42 -06:00
}
package() {
# Pull sources
echo Pulling ${name} ${version}
2024-02-09 17:56:58 -06:00
curl -L "https://github.com/${git_repo}/releases/latest/download/${name}_${version}_Linux-64bit.tar.gz" -o ${name}.tar.gz
2023-01-13 14:27:42 -06:00
# Build package
echo Creating the package
tar -xzf "${name}.tar.gz" -C .
# Binary
install-binary "./${name}"
2023-01-13 14:27:42 -06:00
# Autocomplete
2024-02-09 18:02:46 -06:00
curl -L "https://raw.githubusercontent.com/$git_repo/main/src/install/bash_autocomplete" -o "bash_autocomplete"
curl -L "https://raw.githubusercontent.com/$git_repo/main/src/install/zsh_autocomplete" -o "zsh_autocomplete"
install-completion zsh "${name}" <"./zsh_autocomplete"
install-completion bash "${name}" <"./bash_autocomplete"
2023-01-13 14:27:42 -06:00
}