From 78fc6785000d362d2485e3cb830611b8039de359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 18 Apr 2023 15:21:24 +0200 Subject: [PATCH] Verification that a JSON and TOML dataset are identical --- share/openPMD/json_schema/verify_identical.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 share/openPMD/json_schema/verify_identical.sh diff --git a/share/openPMD/json_schema/verify_identical.sh b/share/openPMD/json_schema/verify_identical.sh new file mode 100755 index 0000000000..207026fbb8 --- /dev/null +++ b/share/openPMD/json_schema/verify_identical.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if (( $# != 2 )); then + echo "Usage: $BASH_SOURCE " >&2 + exit 1 +fi + +diff \ + <(openpmd-convert_json_toml "@$(realpath "$1")" | jq -S .) \ + <(jq -S . < "$2")