1#!/bin/sh 2 3# Define a path, just in case 4export PATH="/usr/local/bin:/bin:/usr/bin:/usr/ccs/bin" 5 6if ! which indent > /dev/null 2>&1 ; then 7 echo "indent not found; exiting."; 8 exit 1; 9fi 10 11pushd `(cd @abs_top_srcdir@ && pwd)` > /dev/null 2>&1 12 13# outfile="`pwd`/style.out"; 14 15# /bin/rm -rf $outfile 16# touch $outfile 17for file in `find src -name '*.[ch]' -print`; do 18 indent -i4 -kr -psl -nce -nut $file -o /tmp/tmpfile 2>&1; 19 if ! diff $file /tmp/tmpfile > /dev/null 2>&1; then 20 echo "$file does not conform to style"; 21 fi; 22done 23 24popd > /dev/null 2>&1 25 26echo "Report finished." 27