Skip to content

Commit 7c2e292

Browse files
authored
Use a safer sed separator in build script to avoid conflicts (#837)
1 parent f3760e8 commit 7c2e292

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.books.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
set -e
44

5+
# safer separator for sed
6+
sep=$'\001'
7+
58
if [ -v GITHUB_REF_NAME ]; then
6-
sed "s/%%FOOTER_VERSION%%/${GITHUB_REF_NAME}/" meta.tmpl.tex > meta.tex
9+
sed "s${sep}%%FOOTER_VERSION%%${sep}${GITHUB_REF_NAME}${sep}" meta.tmpl.tex > meta.tex
710
else
8-
sed "s/%%FOOTER_VERSION%%/UNDEFINED VERSION/" meta.tmpl.tex > meta.tex
11+
sed "s${sep}%%FOOTER_VERSION%%${sep}UNDEFINED VERSION${sep}" meta.tmpl.tex > meta.tex
912
fi
1013

1114
docker run --rm -v `pwd`:/data uppalabharath/pandoc-latex-cjk:latest --from=gfm+rebase_relative_paths -o learn-go-with-tests.pdf \

0 commit comments

Comments
 (0)