Skip to contentSkip to conversation

run{first}latex.sh: Set default of LATEX variable properly

PATCH Applied Akira Yokosawa 2 participants 2 messages Jan 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 run{first}latex.sh: Set default of LATEX variable properly

The default of "pdflatex" has never worked as expected. When these scripts run under Makefile's control, they are given "LATEX=pdflatex" by default, and work just fine.

When directly invoked from command line:

    $ sh utilities/runfirstlatex.sh perfbook

, it runs with LATEX="" and ends up in one of various errors.

Fix this by using the right pattern of ":=".

Fixes 241d5350b162 ("run{first}latex.sh: Use variable for 'pdflatex' command")
---
 utilities/runfirstlatex.sh | 2 +-
 utilities/runlatex.sh      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
utilities/runfirstlatex.sh +1 -1
index b92895f332ca..f12f14886747 100644
@@ -67,7 +67,7 @@ fi
 
 basename=`echo $1 | sed -e 's/\.tex$//'`
 
-: ${LATEX:-pdflatex}
+: ${LATEX:=pdflatex}
 
 echo "$LATEX 1 for $basename.pdf"
 $LATEX $LATEX_OPT $basename > /dev/null 2>&1 < /dev/null
utilities/runlatex.sh +1 -1
index d4c9baf8740a..e23bc87ba978 100644
@@ -29,7 +29,7 @@
 # Authors: Paul E. McKenney <[email protected]>
 #          Akira Yokosawa <[email protected]>
 
-: ${LATEX:-pdflatex}
+: ${LATEX:=pdflatex}
 
 diff_warning () {
 	if diff -q $basename-warning.log $basename-warning-prev.log >/dev/null

base-commit: 685184dff46ffdec02b7402a36b06359cb085f29

Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Akira Yokosawa

The default of "pdflatex" has never worked as expected. When these scripts run under Makefile's control, they are given "LATEX=pdflatex" by default, and work just fine.

When directly invoked from command line:

Quoted 8 lines
    $ sh utilities/runfirstlatex.sh perfbook

, it runs with LATEX="" and ends up in one of various errors.

Fix this by using the right pattern of ":=".

Fixes 241d5350b162 ("run{first}latex.sh: Use variable for 'pdflatex' command")

Queued and pushed, thank you!

Thanx, Paul

Quoted 36 lines
---
 utilities/runfirstlatex.sh | 2 +-
 utilities/runlatex.sh      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
utilities/runfirstlatex.sh +1 -1
index b92895f332ca..f12f14886747 100644
@@ -67,7 +67,7 @@ fi
 
 basename=`echo $1 | sed -e 's/\.tex$//'`
 
-: ${LATEX:-pdflatex}
+: ${LATEX:=pdflatex}
 
 echo "$LATEX 1 for $basename.pdf"
 $LATEX $LATEX_OPT $basename > /dev/null 2>&1 < /dev/null
utilities/runlatex.sh +1 -1
index d4c9baf8740a..e23bc87ba978 100644
@@ -29,7 +29,7 @@
 # Authors: Paul E. McKenney <[email protected]>
 #          Akira Yokosawa <[email protected]>
 
-: ${LATEX:-pdflatex}
+: ${LATEX:=pdflatex}
 
 diff_warning () {
 	if diff -q $basename-warning.log $basename-warning-prev.log >/dev/null

base-commit: 685184dff46ffdec02b7402a36b06359cb085f29

Signature · 1 line
2.25.1