Scott Zawalski | 8cbd08b | 2012-01-25 20:08:53 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (c) 2012 The Chromium OS 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 | |
| 7 | set -e |
Alex Miller | 4f34170 | 2013-03-25 12:39:12 -0700 | [diff] [blame] | 8 | echo "This assumes you have python 2.4 or later installed" |
Scott Zawalski | 8cbd08b | 2012-01-25 20:08:53 -0500 | [diff] [blame] | 9 | for json in *.json; do |
| 10 | echo "Validating $json" |
Alex Miller | 4f34170 | 2013-03-25 12:39:12 -0700 | [diff] [blame] | 11 | python -c "import json; json.load(open('$json'))" || \ |
Scott Zawalski | 8cbd08b | 2012-01-25 20:08:53 -0500 | [diff] [blame] | 12 | printf "\n\n$json is broken!!!!\n\n" |
| 13 | done |