#!/bin/sh tmp_file=/tmp/abi-tidy.$$ rm -f $tmp_file if test "x$2" = "x" || test "x$1" = "x--help"; then echo "usage: abi-tidy-sh " exit 1 fi if test -r "$1"; then echo "" >> $tmp_file echo " " >> $tmp_file title=`cat $1 | grep printHeader | sed -e 's/.*printHeader[(]"//g' -e 's/"[)].*//g'` if test "x$title" != "x"; then echo " $title" >> $tmp_file fi echo " " >> $tmp_file echo " " >> $tmp_file cat index.phtml | sed 's/> $tmp_file echo " " >> $tmp_file echo "" >> $tmp_file tidy -i -asxhtml $tmp_file > "$2" else echo "abi-tidy-sh: $1: no such file" exit 1 fi rm -f $tmp_file