1#!/usr/bin/env bash 2 3# Copyright 2020 The Chromium Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 8 9# NOTE: this is based on this script running from cast/protocol/castv2 10YAJSV_BIN="$SCRIPT_DIR/../../../tools/yajsv" 11 12if [ ! -f "$YAJSV_BIN" ]; then 13 echo "Could not find yajsv, please run tools/download-yajsv.py" 14fi 15 16 17for filename in $SCRIPT_DIR/streaming_examples/*.json; do 18"$YAJSV_BIN" -s "$SCRIPT_DIR/streaming_schema.json" "$filename" 19done 20 21for filename in $SCRIPT_DIR/receiver_examples/*.json; do 22"$YAJSV_BIN" -s "$SCRIPT_DIR/receiver_schema.json" "$filename" 23done 24