alphapapa / makem.sh

Makefile-like script for linting and testing Emacs Lisp packages
GNU General Public License v3.0
163 stars 13 forks source link

Escape backticks in makem.sh usage heredoc #48

Closed snogge closed 4 months ago

snogge commented 4 months ago

The content of heredocs are expanded both for variables and subshell commands, this means backticks must be escaped.

The alternative would be to quote the heredoc like this

cat <<'EOF'
Backticks are `fine'.
EOF

But then the $0 parameter would not be expanded.

alphapapa commented 4 months ago

Thanks for catching and fixing this. I think I had overlooked it because the usage heredoc had become so long that the

./makem.sh: command substitution: line 49: unexpected EOF while looking for matching `''
./makem.sh: command substitution: line 51: syntax error: unexpected end of file

lines scrolled past the top of my screen. :)