diff --git a/tools/convert.sh b/tools/convert.sh index a9b9255..8421bb6 100755 --- a/tools/convert.sh +++ b/tools/convert.sh @@ -281,11 +281,13 @@ if ! test -f "${mdOutFile}"; then exit 1 fi -if [ ! -f "$replaceFilePath" ]; then - error '' "Unable to find replace file $replaceFilePath" 1 -else - jq -r 'to_entries | map("\(.key)/\(.value|tostring)") | .[]' "$replaceFilePath" | - xargs -I {} sed -i 's/{}/g' "$mdOutFile" +if test -n "${ReplaceFile}"; then + if [ ! -f "$replaceFilePath" ]; then + error '' "Unable to find replace file $replaceFilePath" 1 + else + jq -r 'to_entries | map("\(.key)/\(.value|tostring)") | .[]' "$replaceFilePath" | + xargs -I {} sed -i 's/{}/g' "$mdOutFile" + fi fi mdContent=$(cat "${mdOutFile}")