diff --git a/bat/lure.sh b/bat/lure.sh index cc388a1..e69ac33 100644 --- a/bat/lure.sh +++ b/bat/lure.sh @@ -25,8 +25,8 @@ package() { cd "./${name}-${vers}-x86_64-unknown-linux-musl" install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" - install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" - 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 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}" } \ No newline at end of file diff --git a/lf/lure.sh b/lf/lure.sh index 05a7570..665c96b 100644 --- a/lf/lure.sh +++ b/lf/lure.sh @@ -22,14 +22,14 @@ package() { 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://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 - 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 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 . install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" - install -Dm644 "./${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" - install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}" - install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}" + 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}" } \ No newline at end of file diff --git a/lsd/lure.sh b/lsd/lure.sh index c015046..c95a3c6 100644 --- a/lsd/lure.sh +++ b/lsd/lure.sh @@ -25,8 +25,8 @@ package() { cd "./${name}-${vers}-x86_64-unknown-linux-musl" install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" - install -Dm644 "./autocomplete/${name}.fish" "${pkgdir}/usr/share/fish/completions/${name}.fish" - 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 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}" } \ No newline at end of file