fix jq_all_the_things script
parent
3fd907df6b
commit
932356b41b
|
@ -1,5 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Seeds sponge, from moreutils
|
||||||
|
|
||||||
|
#Validate all Jsons first
|
||||||
|
for dir in `find . -name "*.json"`
|
||||||
|
do
|
||||||
|
echo validating ${dir}
|
||||||
|
# python3 -c "import json; f_in = open('${dir}'); data = json.load(f_in); f_in.close(); f_out = open('${dir}', 'w'); json.dump(data, f_out, indent=2, sort_keys=True, ensure_ascii=False); f_out.close();"
|
||||||
|
cat ${dir} | jq . >/dev/null
|
||||||
|
rc=$?
|
||||||
|
if [[ $rc != 0 ]]; then exit $rc; fi
|
||||||
|
done
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue