chore: ftl2md work in progress
@@ -17,8 +17,13 @@ else
fi
convertOneScript=/tmp/convertOneDocFile.sh
+concernsFile=/tmp/concerns.txt
+rm $concernsFile
+touch $concernsFile
+
echo "#!/bin/bash" > ${convertOneScript}
-echo "# Arg: path of .ftl file relative to docs/templates/content" >> ${convertOneScript}
+echo "# Arg 1: path of .ftl file relative to docs/templates/content" >> ${convertOneScript}
+echo "# Arg 2: file to write concerns to" >> ${convertOneScript}
echo "f=\$1" >> ${convertOneScript}
echo "basename=\"\${f%.*}\"" >> ${convertOneScript}
echo "targetfile=../../markdown/\${basename}.md" >> ${convertOneScript}
@@ -26,8 +31,9 @@ echo "targetdir=\$(dirname \$targetfile)" >> ${convertOneScript}
echo "mkdir -p \${targetdir}" >> ${convertOneScript}
echo "echo \">>> \$f -> \${targetfile}\"" >> ${convertOneScript}
echo "sed 's/\\\${\\([a-z_]*\\)}/[\\1]/g' \${basename}.ftl > ../../markdown/\${basename}.md" >> ${convertOneScript}
-echo "echo \"CONCERNS:\"" >> ${convertOneScript}
-echo "grep '\\[.*\\[' ../../markdown/\${basename}.md" >> ${convertOneScript}
+
+echo "echo \"\${targetfile} lines to check:\" >> \${2}" >> ${convertOneScript}
+echo "grep '\[[^]]*\[' ../../markdown/\${basename}.md >> \${2}" >> ${convertOneScript}
chmod +x ${convertOneScript}
@@ -37,5 +43,6 @@ chmod +x ${convertOneScript}
cd $templatesDir
pwd
-find . -name "*.ftl" -exec $convertOneScript {} \;
+find . -name "*.ftl" -exec $convertOneScript {} ${concernsFile} \;
+cat $concernsFile
