Auto-merging via docker-versions-create

This commit is contained in:
Geoff Bourne
2020-02-01 08:52:51 -06:00
5 changed files with 30 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ fi
echo "Checking for JSON files."
JSON_FILES=$(find . -maxdepth 1 -name '*.json')
for j in $JSON_FILES; do
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
if [[ $(cat $j | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') == "" ]]; then
echo "Fixing JSON $j"
echo '[]' > $j
fi