From db8cfe26e71356db6a2d17fa9245a2a5b694178a Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 21 Oct 2024 09:43:34 +0200 Subject: added biber-ms --- README.md | 15 ++++----- tlobsd-getbiber | 95 +++++++++++++++++++++++++++++++++------------------------ 2 files changed, 63 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index c2ce45a..a017354 100644 --- a/README.md +++ b/README.md @@ -251,18 +251,19 @@ Just as `tlobsd tlmgr`, this command requires the `subversion` package. ### biber -A binary version of `biber`, the backend processor for BibLaTeX, is -available in TeX Live for OpenBSD. It can be installed or updated -with `tlobsd` as follows: +Binary versions of `biber` and `biber-ms`, which constitute the +backend processor for BibLaTeX and BibLaTeX-ms, are available in TeX +Live for OpenBSD. They can be installed or updated with `tlobsd` as +follows: ```sh tlobsd getbiber ``` -This command downloads a `biber` executable and attempts to verify it -with the public key that is used to sign the TeX Live for OpenBSD -binaries. See -[above](#installing-tex-live-on-openbsd-with-ready-to-use-binaries). +This command downloads the `biber` and `biber-ms` executables and +attempts to verify them with the public key that is used to sign the +TeX Live for OpenBSD binaries. See +[above](#installing-tex-live-on-openbsd-with-ready-to-use-binaries). Direct link to `biber` binaries: . These can also be installed by hand into the TeX Live binary diff --git a/tlobsd-getbiber b/tlobsd-getbiber index e5a7944..d3d899a 100644 --- a/tlobsd-getbiber +++ b/tlobsd-getbiber @@ -7,6 +7,7 @@ BINREPO=https://www.ekdosis.org/texlive TMPDIR=$(mktemp -d) OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }' | sed 's/\.//') UPDATING=$(curl -s ${BINREPO}/status.txt | grep updating= | sed 's/.*=//') +BIBERNAMES="biber biber-ms" if [[ ! -w ${TLBINDIR} ]]; then echo "You do not have write permissions to ${TLBINDIR}" @@ -22,56 +23,70 @@ fi if [[ ${UPDATING} == "yes" ]];then echo "The binaries are being updated. Please re-run this command later." else - curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz \ - -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz - curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz.asc \ - -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc - gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc - if [[ $? -eq 0 ]];then - unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz - cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber - chmod +x ${TLBINDIR}/biber - echo "Installation complete." - else + for bibername in $BIBERNAMES + do echo "" - echo "The signature could not be verified." - echo " Please import the public key used to sign biber-openbsd${OPENBSD_VERSION}.xz" - echo " as described on the TeX Live for OpenBSD web page, or verify this file from" - echo " the user account that was used to install TeX Live for OpenBSD. (Assumably," - echo " this user has already imported the public key into his keyring. Any user" - echo " whose keyring contains the public key of TeX Live for OpenBSD can be used.)" + echo "Downloading ${bibername}..." echo "" - echo " The file to be verified can be found here: ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz." - echo "" - echo " Would you like me to attempt to verify the file from an account that has" - echo " the public key in its keyring?" - echo "" - read whattodo?"[Y]es/[C]ontinue without verifying/[A]bort installation) [Y]: " - [[ "${whattodo}" == '' ]] && whattodo=y - case $whattodo in - [yY] ) + if curl --output /dev/null --silent --head --fail ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz; + then + curl ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz \ + -o ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz + curl ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc \ + -o ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc + gpg --verify ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc + if [[ $? -eq 0 ]];then + unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername} + chmod +x ${TLBINDIR}/${bibername} + echo "" + echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete." + else + echo "" + echo "The signature could not be verified." + echo " Please import the public key used to sign ${bibername}-openbsd${OPENBSD_VERSION}.xz" + echo " as described on the TeX Live for OpenBSD web page, or verify this file from" + echo " the user account that was used to install TeX Live for OpenBSD. (Assumably," + echo " this user has already imported the public key into his keyring. Any user" + echo " whose keyring contains the public key of TeX Live for OpenBSD can be used.)" + echo "" + echo " The file to be verified can be found here: ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz." + echo "" + echo " Would you like me to attempt to verify the file from an account that has" + echo " the public key in its keyring?" + echo "" + read whattodo?"[Y]es/[C]ontinue without verifying/[A]bort installation) [Y]: " + [[ "${whattodo}" == '' ]] && whattodo=y + case $whattodo in + [yY] ) read username?"Enter any user name whose keyring contains the public key of TeX Live for OpenBSD: " chmod 755 ${TMPDIR} - doas -u ${username} gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc + doas -u ${username} gpg --verify ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc if [[ $? -eq 0 ]];then - unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz - cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber - chmod +x ${TLBINDIR}/biber - echo "Installation complete." + unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername} + chmod +x ${TLBINDIR}/${bibername} + echo "" + echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete." else - exit 1 + exit 1 fi ;; - [cC] ) - unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz - cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber - chmod +x ${TLBINDIR}/biber - echo "Installation complete." + [cC] ) + unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz + cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername} + chmod +x ${TLBINDIR}/${bibername} + echo "" + echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete." ;; - * ) + * ) echo "Aborting..." exit 1 ;; - esac - fi + esac + fi + else + echo "${bibername}-openbsd${OPENBSD_VERSION} is not (yet) available. Please check again later." + fi + done fi -- cgit v1.2.3