Home | History | Annotate | Download | only in documentation
      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
      9 set -o nounset
     10 set -o errexit
     11 
     12 
     13 CheckFile () {
     14   echo "========================================"
     15   echo "checking $1"
     16   echo "========================================"
     17   tidy -e -q $1
     18 }
     19 
     20 
     21 if [ $# -eq 0  ] ; then
     22   for file in *.html ; do
     23    CheckFile ${file}
     24   done
     25 else
     26   for file in $* ; do
     27    CheckFile ${file}
     28   done
     29 fi
     30