| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# notinuse |
| 4 |
# |
| 5 |
# Scan subdirectories for files that may not be in use, |
| 6 |
# that is, old files that should be removed. |
| 7 |
# |
| 8 |
# This script should be run from the top level directory. |
| 9 |
|
| 10 |
# Simple test to see where we are |
| 11 |
# FIXME: Does not work when typing ./scripts/... |
| 12 |
CHECK=`echo $0 | cut -d'/' -f1` |
| 13 |
if [ "$CHECK" != "scripts" ]; then |
| 14 |
echo "This script must be run from the top level directory." |
| 15 |
exit 1 |
| 16 |
fi |
| 17 |
|
| 18 |
for f in `find . -name '*.h' -printf '%f '`; do |
| 19 |
a=`rgrep $f * | grep include` |
| 20 |
if [ "x$a" == "x" ]; then |
| 21 |
echo File $f may not be used. |
| 22 |
fi |
| 23 |
done |