diff options
author | Mikle Kolyada <zlogene@gentoo.org> | 2020-02-14 16:34:44 +0300 |
---|---|---|
committer | Mikle Kolyada <zlogene@gentoo.org> | 2020-02-14 16:38:48 +0300 |
commit | 80f3c2c5f72e3a7d2cf6e0de24c3ef027d27e9c4 (patch) | |
tree | 871406b86f967d59d18df87f093fad146eee8091 /eclass | |
parent | sci-physics/lammps: Drop Python 2.7 (diff) | |
download | gentoo-80f3c2c5f72e3a7d2cf6e0de24c3ef027d27e9c4.tar.gz gentoo-80f3c2c5f72e3a7d2cf6e0de24c3ef027d27e9c4.tar.bz2 gentoo-80f3c2c5f72e3a7d2cf6e0de24c3ef027d27e9c4.zip |
latex-package.eclass: improve files search
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/latex-package.eclass | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass index e24fd1875f47..3d2c09754775 100644 --- a/eclass/latex-package.eclass +++ b/eclass/latex-package.eclass @@ -102,32 +102,32 @@ latex-package_src_doinstall() { while [[ ${1} ]]; do case ${1} in "sh") - while read -r -d '' i; do + while IFS= read -r -d '' i; do dobin ${i} - done < <(find -maxdepth 1 -type f -name "*.${1}") + done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "sty" | "cls" | "fd" | "clo" | "def" | "cfg") - while read -r -d '' i; do + while IFS= read -r -d '' i; do insinto ${TEXMF}/tex/latex/${PN} doins ${i} - done < <(find -maxdepth 1 -type f -name "*.${1}") + done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "dvi" | "ps" | "pdf") - while read -r -d '' i; do + 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}) - done < <(find -maxdepth 1 -type f -name "*.${1}") + done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "tex" | "dtx") if ! in_iuse doc || use doc ; then - while read -r -d '' i; do - [[ -n ${LATEX_PACKAGE_SKIP} ]] && \ - has ${i##*/} ${LATEX_PACKAGE_SKIP} && \ + while IFS= read -r -d '' i; do + [[ -n ${LATEX_PACKAGE_SKIP} ]] && + has ${i##*/} ${LATEX_PACKAGE_SKIP} && continue einfo "Making documentation: ${i}" @@ -139,34 +139,34 @@ latex-package_src_doinstall() { einfo "pdflatex failed, trying texi2dvi" texi2dvi -q -c --language=latex ${i} || die fi - done < <(find -maxdepth 1 -type f -name "*.${1}") + done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) fi ;; "tfm" | "vf" | "afm") - while read -r -d '' i; do + while IFS= read -r -d '' i; do insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} doins ${i} - done < <(find -maxdepth 1 -type f -name "*.${1}") + done < <(find -maxdepth 1 -type f -name "*.${1}" -print0) ;; "pfb") - while read -r -d '' i; do + while IFS= read -r -d '' i; do insinto ${TEXMF}/fonts/type1/${SUPPLIER}/${PN} doins ${i} - done < <(find -maxdepth 1 -type f -name "*.pfb") + done < <(find -maxdepth 1 -type f -name "*.pfb" -print0) ;; "ttf") - while read -r -d '' i; do + while IFS= read -r -d '' i; do insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} doins ${i} - done < <(find -maxdepth 1 -type f -name "*.ttf") + done < <(find -maxdepth 1 -type f -name "*.ttf" -print0) ;; "bst") - while read -r -d '' i; do + while IFS= read -r -d '' i; do insinto ${TEXMF}/bibtex/bst/${PN} doins ${i} - done < <(find -maxdepth 1 -type f -name "*.bst") + done < <(find -maxdepth 1 -type f -name "*.bst" -print0) ;; "styles") @@ -199,10 +199,10 @@ latex-package_src_doinstall() { # relevant files that will be installed latex-package_src_compile() { debug-print function $FUNCNAME $* - while read -r -d '' i; do + while IFS= read -r -d '' i; do einfo "Extracting from ${i}" latex --halt-on-error --interaction=nonstopmode ${i} || die - done < <(find -maxdepth 1 -type f -name "*.ins") + done < <(find -maxdepth 1 -type f -name "*.ins" -print0) } # @FUNCTION: latex-package_src_install |