Skip to content
Snippets Groups Projects
Commit 9b4629bd authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Warn on missing replacements; handle Ruby vars with single and double quotes

parent 1ed0c774
No related branches found
No related tags found
No related merge requests found
...@@ -98,7 +98,7 @@ do ...@@ -98,7 +98,7 @@ do
# Ruby erb template syntax to write a variable: <% @replace["mykey"] %> # Ruby erb template syntax to write a variable: <% @replace["mykey"] %>
# Here are 2 regex to handle single and double quotes # Here are 2 regex to handle single and double quotes
regex1="<\%\=\ *\@replace\[\'$key\'\]\ *\%>" regex1="<\%\=\ *\@replace\['$key'\]\ *\%>"
regex2="<\%\=\ *\@replace\[\"$key\"\]\ *\%>" regex2="<\%\=\ *\@replace\[\"$key\"\]\ *\%>"
# Show a warning if both regex do not match # Show a warning if both regex do not match
...@@ -132,6 +132,7 @@ if [ $? -ne 0 ]; then ...@@ -132,6 +132,7 @@ if [ $? -ne 0 ]; then
exit 4 exit 4
fi fi
echo
echo --- Check missing replacements echo --- Check missing replacements
grep '<\%\=\ *\@replace\[' ${outfile} >/dev/null grep '<\%\=\ *\@replace\[' ${outfile} >/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment