summaryrefslogtreecommitdiff
path: root/localtidygeojson
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-01-12 21:14:38 +0100
committerJonas Smedegaard <dr@jones.dk>2014-01-12 21:14:38 +0100
commita993c7d66f66af964772f23af6b3a9e7fb814a4b (patch)
tree5286a2b3879e845fece0db3a14eb974e2a746c8c /localtidygeojson
parent2644211898a7b36f0568a80a1d9c3c84b82e84c2 (diff)
Fix use jq as tidier (json_xs randomly shuffles data).
Diffstat (limited to 'localtidygeojson')
-rwxr-xr-xlocaltidygeojson4
1 files changed, 2 insertions, 2 deletions
diff --git a/localtidygeojson b/localtidygeojson
index 23d95c5..49f8c6e 100755
--- a/localtidygeojson
+++ b/localtidygeojson
@@ -16,8 +16,8 @@
# 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: libjson-xs-perl moreutils
+# Depends: jq moreutils
set -eu
-json_xs < "$1" | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' | sponge "$1"
+jq . "$1" | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' | sponge "$1"