summaryrefslogtreecommitdiffstats
path: root/latex
diff options
context:
space:
mode:
authorIsmael Luceno2021-01-11 17:03:32 +0100
committerIsmael Luceno2021-01-11 19:07:53 +0100
commit8aff9b9cd79bcd411464e341d322937e9c5cc034 (patch)
tree031db6c7f16312dbdfb9428331f1b0c1d8b19407 /latex
parent56f9e83a47f5dfffc70ff72ae713de5dcd88a66a (diff)
texlive-texmf: Optimize pre-built PDF removal
Diffstat (limited to 'latex')
-rw-r--r--latex/texlive-texmf/HISTORY1
-rwxr-xr-xlatex/texlive-texmf/PRE_BUILD6
2 files changed, 4 insertions, 3 deletions
diff --git a/latex/texlive-texmf/HISTORY b/latex/texlive-texmf/HISTORY
index 295424ac1b..c2844ac448 100644
--- a/latex/texlive-texmf/HISTORY
+++ b/latex/texlive-texmf/HISTORY
@@ -1,5 +1,6 @@
2021-01-11 Ismael Luceno <ismael@sourcemage.org>
* DETAILS: updated spell to 20200406
+ * PRE_BUILD: optimized pre-built PDF removal
2019-05-01 Pavel Vinogradov <public@sourcemage.org>
* DETAILS: version 20190410
diff --git a/latex/texlive-texmf/PRE_BUILD b/latex/texlive-texmf/PRE_BUILD
index 4c18686bcd..6cae5d6354 100755
--- a/latex/texlive-texmf/PRE_BUILD
+++ b/latex/texlive-texmf/PRE_BUILD
@@ -6,10 +6,10 @@ apply_patch_dir patches &&
# find all the pdfs, strip the extension and then check if their source is
# also present. If it is, remove the pdf.
if [[ $TTMF_SMALL == y ]]; then
- find "$SOURCE_DIRECTORY" -type f -iname "*.pdf" | sed 's,....$,,' |
+ find "$SOURCE_DIRECTORY" -name "*.pdf" |
while read p; do
- if [[ -e "$p.pdf" && -e "$p.tex" ]]; then
- rm "$p.pdf"
+ if [[ -e "${p%pdf}tex" ]]; then
+ rm "$p"
fi
done
fi