diff --git a/tools/convert.sh b/tools/convert.sh index 6f262c0..a9b9255 100755 --- a/tools/convert.sh +++ b/tools/convert.sh @@ -281,7 +281,9 @@ if ! test -f "${mdOutFile}"; then exit 1 fi -if [ -f "$replaceFilePath" ]; 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