Only install the relevant completions

This commit is contained in:
Sayantan Santra 2022-11-20 15:03:42 -06:00
parent 63a8bccca3
commit 9c50afe606
3 changed files with 12 additions and 12 deletions

View file

@ -25,8 +25,8 @@ package() {
cd "./${name}-${vers}-x86_64-unknown-linux-musl" cd "./${name}-${vers}-x86_64-unknown-linux-musl"
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" command -v fish &> /dev/null && install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
install -Dm644 "./autocomplete/${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}" command -v zsh &> /dev/null && install -Dm644 "./autocomplete/${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
install -Dm644 "./autocomplete/${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}" command -v bash &> /dev/null && install -Dm644 "./autocomplete/${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}"
} }

View file

@ -22,14 +22,14 @@ package() {
echo Installing ${name} ${vers} echo Installing ${name} ${vers}
curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-linux-${ARCH}.tar.gz" -o ${name}.tar.gz curl -L "https://github.com/${git_repo}/releases/download/${vers}/${name}-linux-${ARCH}.tar.gz" -o ${name}.tar.gz
curl -L "https://raw.githubusercontent.com/${git_repo}/master/${name}.1" -o ${name}.1 curl -L "https://raw.githubusercontent.com/${git_repo}/master/${name}.1" -o ${name}.1
curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.fish" -o ${name}.fish command -v fish &> /dev/null && curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.fish" -o ${name}.fish
curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.zsh" -o ${name}.zsh command -v zsh &> /dev/null && curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.zsh" -o ${name}.zsh
curl -L "https://raw.githubusercontent.com/${git_repo}/master/etc/${name}.bash" -o ${name}.bash 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 . tar xzf "${name}.tar.gz" -C .
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
install -Dm644 "./${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" command -v fish &> /dev/null && install -Dm644 "./${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}" command -v zsh &> /dev/null && install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}" command -v bash &> /dev/null && install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}"
} }

View file

@ -25,8 +25,8 @@ package() {
cd "./${name}-${vers}-x86_64-unknown-linux-musl" cd "./${name}-${vers}-x86_64-unknown-linux-musl"
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" command -v fish &> /dev/null && install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish"
install -Dm644 "./autocomplete/_${name}" "${pkgdir}/usr/share/zsh/site-functions/_${name}" command -v zsh &> /dev/null && install -Dm644 "./autocomplete/_${name}" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
install -Dm644 "./autocomplete/${name}.bash-completion" "${pkgdir}/usr/share/bash-completion/completions/${name}" command -v bash &> /dev/null && install -Dm644 "./autocomplete/${name}.bash-completion" "${pkgdir}/usr/share/bash-completion/completions/${name}"
} }