diff options
author | Ulrich Müller <ulm@gentoo.org> | 2022-04-11 12:37:23 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2022-04-15 10:58:43 +0200 |
commit | fa3d9fa67e6b8f39bf0e8e85d71bbeae8236aa06 (patch) | |
tree | 8eed630c5b10fce70e156a2125ddf52421994e30 /eclass/latex-package.eclass | |
parent | net-im/signal-desktop-bin: remove old version (diff) | |
download | gentoo-fa3d9fa67e6b8f39bf0e8e85d71bbeae8236aa06.tar.gz gentoo-fa3d9fa67e6b8f39bf0e8e85d71bbeae8236aa06.tar.bz2 gentoo-fa3d9fa67e6b8f39bf0e8e85d71bbeae8236aa06.zip |
latex-package.eclass: Properly quote variables
Bug: https://bugs.gentoo.org/379571
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/latex-package.eclass')
-rw-r--r-- | eclass/latex-package.eclass | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass index 359b5177bb37..bee04b607de1 100644 --- a/eclass/latex-package.eclass +++ b/eclass/latex-package.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: latex-package.eclass @@ -103,23 +103,24 @@ latex-package_src_doinstall() { case ${1} in "sh") while IFS= read -r -d '' i; do - dobin ${i} + dobin "${i}" done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "sty" | "cls" | "fd" | "clo" | "def" | "cfg") while IFS= read -r -d '' i; do - insinto ${TEXMF}/tex/latex/${PN} - doins ${i} + insinto "${TEXMF}/tex/latex/${PN}" + doins "${i}" done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "dvi" | "ps" | "pdf") while IFS= read -r -d '' i; do insinto /usr/share/doc/${PF} - doins ${i} - dosym /usr/share/doc/${PF}/$(basename ${i}) ${TEXMF}/doc/latex/${PN}/${i} - docompress -x /usr/share/doc/${PF}/$(basename ${i}) + doins "${i}" + dosym "/usr/share/doc/${PF}/$(basename "${i}")" \ + "${TEXMF}/doc/latex/${PN}/${i}" + docompress -x "/usr/share/doc/${PF}/$(basename "${i}")" done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; @@ -127,17 +128,18 @@ latex-package_src_doinstall() { if ! in_iuse doc || use doc ; then while IFS= read -r -d '' i; do [[ -n ${LATEX_PACKAGE_SKIP} ]] && - has ${i##*/} ${LATEX_PACKAGE_SKIP} && + has "${i##*/}" ${LATEX_PACKAGE_SKIP} && continue einfo "Making documentation: ${i}" # some macros need compiler called twice, do it here. - set -- pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode ${i} + set -- pdflatex ${LATEX_DOC_ARGUMENTS} \ + --halt-on-error --interaction=nonstopmode "${i}" if "${@}"; then "${@}" else einfo "pdflatex failed, trying texi2dvi" - texi2dvi -q -c --language=latex ${i} || die + texi2dvi -q -c --language=latex "${i}" || die fi done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) fi @@ -145,27 +147,27 @@ latex-package_src_doinstall() { "tfm" | "vf" | "afm") while IFS= read -r -d '' i; do - insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} - doins ${i} + insinto "${TEXMF}/fonts/${1}/${SUPPLIER}/${PN}" + doins "${i}" done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "pfb") while IFS= read -r -d '' i; do - insinto ${TEXMF}/fonts/type1/${SUPPLIER}/${PN} - doins ${i} + insinto "${TEXMF}/fonts/type1/${SUPPLIER}/${PN}" + doins "${i}" done < <(find -maxdepth 1 -type f -name "*.pfb" -print0) ;; "ttf") while IFS= read -r -d '' i; do - insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} - doins ${i} + insinto "${TEXMF}/fonts/truetype/${SUPPLIER}/${PN}" + doins "${i}" done < <(find -maxdepth 1 -type f -name "*.ttf" -print0) ;; "bst") while IFS= read -r -d '' i; do - insinto ${TEXMF}/bibtex/bst/${PN} - doins ${i} + insinto "${TEXMF}/bibtex/bst/${PN}" + doins "${i}" done < <(find -maxdepth 1 -type f -name "*.bst" -print0) ;; @@ -201,7 +203,7 @@ latex-package_src_compile() { debug-print function $FUNCNAME $* while IFS= read -r -d '' i; do einfo "Extracting from ${i}" - latex --halt-on-error --interaction=nonstopmode ${i} || die + latex --halt-on-error --interaction=nonstopmode "${i}" || die done < <(find -maxdepth 1 -type f -name "*.ins" -print0) } |