Support for additional UNIX variants: (Christian Engel)
[scons.git] / bin / check
1 #! /bin/sh
2
3 # This script runs pychecker on the SCons source and creates a file called
4 # checks.txt with the results. It must be run in the src/engine directory.
5
6 base=`basename $PWD`
7 if [ "$base" != "engine" ]; then
8    echo "You must run this script from the engine directory."
9    exit
10 fi
11
12 DEVDIR=../../doc/developer
13 SRCFILE=../../bin/files
14 CHKFILE=checks.txt
15
16 rm -f $CHKFILE
17 for f in `cat $SRCFILE` ; do
18    echo >> $CHKFILE
19    echo " --- $f ---" >> $CHKFILE
20    env PYTHONPATH=. pychecker -T -z -Z --deprecated $f >> $CHKFILE
21 done
22
23 if [ -e $CHKFILE ]; then
24    sed -e "s|$PWD/||" $CHKFILE > /tmp/tmpchk
25    mv -f /tmp/tmpchk $CHKFILE
26 fi