summaryrefslogtreecommitdiff
path: root/localtidygeojson
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-01-12 23:24:24 +0100
committerJonas Smedegaard <dr@jones.dk>2014-01-12 23:24:24 +0100
commit3b4227cd1e0401963a502aa171ac2a36d8e1a9be (patch)
treec9a5a95f2284f0943cd9dd9448f12224cc0632f3 /localtidygeojson
parent6989ba06ec5cc2b651b695c8fb5ccb378c27f33a (diff)
Fix use json_pp as tidier (available in stable).
Diffstat (limited to 'localtidygeojson')
-rwxr-xr-xlocaltidygeojson6
1 files changed, 3 insertions, 3 deletions
diff --git a/localtidygeojson b/localtidygeojson
index 9cc0a1e..7dbcf7b 100755
--- a/localtidygeojson
+++ b/localtidygeojson
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# Depends: jq
+# Depends: perl-modules
set -eu
-jq . "$1" > "$1"~
-perl -0 -i -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"~
+json_pp -json_opt pretty,canonical < "$1" > "$1"~
+perl -0 -i -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"~
mv -f "$1"~ "$1"