Skip to content

Commit 529399f

Browse files
committed
pdf: use printf over echo
echo may introduce inconsistent behaviors over different platforms. printf is considered better than echo. See: https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo Fixes changkun#188
1 parent ed88f4e commit 529399f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pdf/en-us/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ revision = $(shell git describe --always --tags)
66
all: revision pdf
77

88
revision:
9-
@echo '% Autogenerated, do not edit' > revision.tex
10-
@echo '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
9+
printf '%% Autogenerated, do not edit\n' > revision.tex
10+
printf '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
1111

1212
pdf: markdown
1313
@echo "Compiling PDF file..."

pdf/zh-cn/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ revision = $(shell git describe --always --tags)
66
all: revision pdf
77

88
revision:
9-
@echo '% Autogenerated, do not edit' > revision.tex
10-
@echo '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
9+
printf '%% Autogenerated, do not edit\n' > revision.tex
10+
printf '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
1111

1212
pdf: markdown
1313
@echo "Compiling PDF file..."

0 commit comments

Comments
 (0)