source: clfs-embedded/BOOK/tidy.sh@ 7efa496

Last change on this file since 7efa496 was a94e338, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Integrated the Makefile from the main book.

  • Property mode set to 100755
File size: 512 bytes
Line 
1#!/bin/sh
2# Written By: Joe Ciccone <jciccone@gmail.com>
3
4if test -z "$1"; then
5 echo "Usage: $0 path"
6 exit 1
7fi
8
9TOP=`dirname $0`
10
11if test -d "$1"; then
12 find "$1" -type f -name \*.html | while read file; do
13 tidy -config "${TOP}/tidy.conf" "$file"
14 bash "${TOP}/obfuscate.sh" "$file"
15 sed -i -e "s@text/html@application/xhtml+xml@g" "$file"
16 done
17else
18 tidy -config "${TOP}/tidy.conf" "$1"
19 bash "${TOP}/obfuscate.sh" "$1"
20 sed -i -e "s@text/html@application/xhtml+xml@g" "$1"
21fi
22
23exit $?
Note: See TracBrowser for help on using the repository browser.