1#!/bin/bash
2# Copyright (c) 2013 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# simple script to check html via tidy. Either specify html files on
7# command line or rely on default which checks all html files in
8# current directory
9set -o nounset
10set -o errexit
11
12
13CheckFile () {
14  echo "========================================"
15  echo "checking $1"
16  echo "========================================"
17  tidy -e -q $1
18}
19
20
21if [ $# -eq 0  ] ; then
22  for file in *.html ; do
23   CheckFile ${file}
24  done
25else
26  for file in $* ; do
27   CheckFile ${file}
28  done
29fi
30