aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--tlobsd-getbiber95
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.
251 251
252### biber 252### biber
253 253
254A binary version of `biber`, the backend processor for BibLaTeX, is 254Binary versions of `biber` and `biber-ms`, which constitute the
255available in TeX Live for OpenBSD. It can be installed or updated 255backend processor for BibLaTeX and BibLaTeX-ms, are available in TeX
256with `tlobsd` as follows: 256Live for OpenBSD. They can be installed or updated with `tlobsd` as
257follows:
257 258
258```sh 259```sh
259tlobsd getbiber 260tlobsd getbiber
260``` 261```
261 262
262This command downloads a `biber` executable and attempts to verify it 263This command downloads the `biber` and `biber-ms` executables and
263with the public key that is used to sign the TeX Live for OpenBSD 264attempts to verify them with the public key that is used to sign the
264binaries. See 265TeX Live for OpenBSD binaries. See
265[above](#installing-tex-live-on-openbsd-with-ready-to-use-binaries). 266[above](#installing-tex-live-on-openbsd-with-ready-to-use-binaries).
266 267
267Direct link to `biber` binaries: <https://www.ekdosis.org/texlive>. 268Direct link to `biber` binaries: <https://www.ekdosis.org/texlive>.
268These can also be installed by hand into the TeX Live binary 269These 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
7TMPDIR=$(mktemp -d) 7TMPDIR=$(mktemp -d)
8OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }' | sed 's/\.//') 8OPENBSD_VERSION=$(sysctl -n kern.version | awk 'FNR == 1 { print $2 }' | sed 's/\.//')
9UPDATING=$(curl -s ${BINREPO}/status.txt | grep updating= | sed 's/.*=//') 9UPDATING=$(curl -s ${BINREPO}/status.txt | grep updating= | sed 's/.*=//')
10BIBERNAMES="biber biber-ms"
10 11
11if [[ ! -w ${TLBINDIR} ]]; then 12if [[ ! -w ${TLBINDIR} ]]; then
12 echo "You do not have write permissions to ${TLBINDIR}" 13 echo "You do not have write permissions to ${TLBINDIR}"
@@ -22,56 +23,70 @@ fi
22if [[ ${UPDATING} == "yes" ]];then 23if [[ ${UPDATING} == "yes" ]];then
23 echo "The binaries are being updated. Please re-run this command later." 24 echo "The binaries are being updated. Please re-run this command later."
24else 25else
25 curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz \ 26 for bibername in $BIBERNAMES
26 -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz 27 do
27 curl ${BINREPO}/biber-openbsd${OPENBSD_VERSION}.xz.asc \
28 -o ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc
29 gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc
30 if [[ $? -eq 0 ]];then
31 unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz
32 cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber
33 chmod +x ${TLBINDIR}/biber
34 echo "Installation complete."
35 else
36 echo "" 28 echo ""
37 echo "The signature could not be verified." 29 echo "Downloading ${bibername}..."
38 echo " Please import the public key used to sign biber-openbsd${OPENBSD_VERSION}.xz"
39 echo " as described on the TeX Live for OpenBSD web page, or verify this file from"
40 echo " the user account that was used to install TeX Live for OpenBSD. (Assumably,"
41 echo " this user has already imported the public key into his keyring. Any user"
42 echo " whose keyring contains the public key of TeX Live for OpenBSD can be used.)"
43 echo "" 30 echo ""
44 echo " The file to be verified can be found here: ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz." 31 if curl --output /dev/null --silent --head --fail ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz;
45 echo "" 32 then
46 echo " Would you like me to attempt to verify the file from an account that has" 33 curl ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz \
47 echo " the public key in its keyring?" 34 -o ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz
48 echo "" 35 curl ${BINREPO}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc \
49 read whattodo?"[Y]es/[C]ontinue without verifying/[A]bort installation) [Y]: " 36 -o ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc
50 [[ "${whattodo}" == '' ]] && whattodo=y 37 gpg --verify ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc
51 case $whattodo in 38 if [[ $? -eq 0 ]];then
52 [yY] ) 39 unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz
40 cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername}
41 chmod +x ${TLBINDIR}/${bibername}
42 echo ""
43 echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete."
44 else
45 echo ""
46 echo "The signature could not be verified."
47 echo " Please import the public key used to sign ${bibername}-openbsd${OPENBSD_VERSION}.xz"
48 echo " as described on the TeX Live for OpenBSD web page, or verify this file from"
49 echo " the user account that was used to install TeX Live for OpenBSD. (Assumably,"
50 echo " this user has already imported the public key into his keyring. Any user"
51 echo " whose keyring contains the public key of TeX Live for OpenBSD can be used.)"
52 echo ""
53 echo " The file to be verified can be found here: ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz."
54 echo ""
55 echo " Would you like me to attempt to verify the file from an account that has"
56 echo " the public key in its keyring?"
57 echo ""
58 read whattodo?"[Y]es/[C]ontinue without verifying/[A]bort installation) [Y]: "
59 [[ "${whattodo}" == '' ]] && whattodo=y
60 case $whattodo in
61 [yY] )
53 read username?"Enter any user name whose keyring contains the public key of TeX Live for OpenBSD: " 62 read username?"Enter any user name whose keyring contains the public key of TeX Live for OpenBSD: "
54 chmod 755 ${TMPDIR} 63 chmod 755 ${TMPDIR}
55 doas -u ${username} gpg --verify ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz.asc 64 doas -u ${username} gpg --verify ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz.asc
56 if [[ $? -eq 0 ]];then 65 if [[ $? -eq 0 ]];then
57 unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz 66 unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz
58 cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber 67 cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername}
59 chmod +x ${TLBINDIR}/biber 68 chmod +x ${TLBINDIR}/${bibername}
60 echo "Installation complete." 69 echo ""
70 echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete."
61 else 71 else
62 exit 1 72 exit 1
63 fi 73 fi
64 ;; 74 ;;
65 [cC] ) 75 [cC] )
66 unxz ${TMPDIR}/biber-openbsd${OPENBSD_VERSION}.xz 76 unxz ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION}.xz
67 cp ${TMPDIR}/biber-openbsd${OPENBSD_VERSION} ${TLBINDIR}/biber 77 cp ${TMPDIR}/${bibername}-openbsd${OPENBSD_VERSION} ${TLBINDIR}/${bibername}
68 chmod +x ${TLBINDIR}/biber 78 chmod +x ${TLBINDIR}/${bibername}
69 echo "Installation complete." 79 echo ""
80 echo "Installation of ${bibername}-openbsd${OPENBSD_VERSION} complete."
70 ;; 81 ;;
71 * ) 82 * )
72 echo "Aborting..." 83 echo "Aborting..."
73 exit 1 84 exit 1
74 ;; 85 ;;
75 esac 86 esac
76 fi 87 fi
88 else
89 echo "${bibername}-openbsd${OPENBSD_VERSION} is not (yet) available. Please check again later."
90 fi
91 done
77fi 92fi