blob: 62f7d6cd74ecd880c45ab400ebfcffb7aed63b70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/sh
#
# Run python's json.tool and check for changes
#
# requires python 3.9 for --indent
#
file=$1
before=$(cat "$file") &&
python3 -m json.tool --indent 2 "$file" "$file" &&
after=$(cat "$file") &&
test "$before" = "$after"
|