Add comments and more output

This commit is contained in:
Sayantan Santra 2022-11-21 23:57:28 -06:00
parent 3946a9d08f
commit 6e7681b5c3
4 changed files with 37 additions and 18 deletions

View file

@ -18,13 +18,18 @@ version() {
}
package() {
vers="$(curl --silent "https://api.github.com/repos/${git_repo}/releases/latest" | grep -Eo '"tag_name": "v(.*)"' | sed -E 's/.*"([^"]+)".*/\1/')"
echo Installing ${name} ${vers}
curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-${vers}-x86_64-unknown-linux-musl.tar.gz" -o ${name}.tar.gz
tar xzf "${name}.tar.gz" -C .
cd "./${name}-${vers}-x86_64-unknown-linux-musl"
# Pull sources
echo Pulling ${name} ${version}
curl -L "https://github.com/${git_repo}/releases/download/${version}/${name}-${version}-x86_64-unknown-linux-musl.tar.gz" -o ${name}.tar.gz
# Build package
echo Creating the package
tar -xzf "${name}.tar.gz" -C .
cd "./${name}-${version}-x86_64-unknown-linux-musl"
# Binary
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
# Manpage
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
# Autocomplete
command -v fish &> /dev/null && install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
command -v zsh &> /dev/null && install -Dm644 "./autocomplete/${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
command -v bash &> /dev/null && install -Dm644 "./autocomplete/${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}"

View file

@ -18,12 +18,16 @@ version() {
}
package() {
vers="$(curl --silent "https://api.github.com/repos/${git_repo}/releases/latest" | grep -Eo '"tag_name": "v(.*)"' | sed -E 's/.*"([^"]+)".*/\1/')"
echo Installing ${name} ${vers}
curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}_${vers}_linux-static_${ARCH}.tar.gz" -o ${name}.tar.gz
tar xzf "${name}.tar.gz" -C .
# Pull sources
echo Pulling ${name} ${version}
curl -L "https://github.com/${git_repo}/releases/download/${version}/${name}_${version}_linux-static_${ARCH}.tar.gz" -o ${name}.tar.gz
# Build package
echo Creating the package
tar -xzf "${name}.tar.gz" -C .
# Binaries
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
install -Dm755 "./${name}-xray" "${pkgdir}/usr/local/bin/${name}-xray"
# Manpages
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
install -Dm644 "./${name}-xray.1" "${pkgdir}/usr/local/share/man/man1/${name}-xray.1"
}

View file

@ -18,16 +18,21 @@ version() {
}
package() {
vers="$(curl --silent "https://api.github.com/repos/${git_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-${ARCH}.tar.gz" -o ${name}.tar.gz
# Pull sources
echo Pulling ${name} ${version}
curl -L "https://github.com/${git_repo}/releases/download/${version}/${name}-linux-${ARCH}.tar.gz" -o ${name}.tar.gz
curl -L "https://raw.githubusercontent.com/${git_repo}/master/${name}.1" -o ${name}.1
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
tar xzf "${name}.tar.gz" -C .
# Build package
echo Creating the package
tar -xzf "${name}.tar.gz" -C .
# Binary
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
# Manpage
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
# Autocomplete
command -v fish &> /dev/null && install -Dm644 "./${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
command -v zsh &> /dev/null && install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
command -v bash &> /dev/null && install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}"

View file

@ -18,13 +18,18 @@ version() {
}
package() {
vers="$(curl --silent "https://api.github.com/repos/${git_repo}/releases/latest" | grep -Eo '"tag_name": "(.*)"' | sed -E 's/.*"([^"]+)".*/\1/')"
echo Installing ${name} ${vers}
curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-${vers}-x86_64-unknown-linux-musl.tar.gz" -o ${name}.tar.gz
tar xzf "${name}.tar.gz" -C .
cd "./${name}-${vers}-x86_64-unknown-linux-musl"
# Pull sources
echo Pulling ${name} ${version}
curl -L "https://github.com/${git_repo}/releases/download/${version}/${name}-${version}-x86_64-unknown-linux-musl.tar.gz" -o ${name}.tar.gz
# Build package
echo Creating the package
tar -xzf "${name}.tar.gz" -C .
cd "./${name}-${version}-x86_64-unknown-linux-musl"
# Binary
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
# Manpage
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
# Autocomplete
command -v fish &> /dev/null && install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
command -v zsh &> /dev/null && install -Dm644 "./autocomplete/_${name}" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
command -v bash &> /dev/null && install -Dm644 "./autocomplete/${name}.bash-completion" "${pkgdir}/usr/share/bash-completion/completions/${name}"