From 7c2e2927180cb1eec9aa54a72c6155bc79e70fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deividas=20Bur=C5=A1kaitis?= Date: Tue, 14 Jan 2025 15:58:17 +0200 Subject: [PATCH] Use a safer sed separator in build script to avoid conflicts (#837) --- build.books.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.books.sh b/build.books.sh index 02a2b862..55c21552 100755 --- a/build.books.sh +++ b/build.books.sh @@ -2,10 +2,13 @@ set -e +# safer separator for sed +sep=$'\001' + if [ -v GITHUB_REF_NAME ]; then - sed "s/%%FOOTER_VERSION%%/${GITHUB_REF_NAME}/" meta.tmpl.tex > meta.tex + sed "s${sep}%%FOOTER_VERSION%%${sep}${GITHUB_REF_NAME}${sep}" meta.tmpl.tex > meta.tex else - sed "s/%%FOOTER_VERSION%%/UNDEFINED VERSION/" meta.tmpl.tex > meta.tex + sed "s${sep}%%FOOTER_VERSION%%${sep}UNDEFINED VERSION${sep}" meta.tmpl.tex > meta.tex fi docker run --rm -v `pwd`:/data uppalabharath/pandoc-latex-cjk:latest --from=gfm+rebase_relative_paths -o learn-go-with-tests.pdf \