135
by logg
Tailorized "2003-05-06 15:31:45 by logg" |
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
|
|
191
by logg
Tailorized "2003-06-17 07:40:27 by logg" |
11 |
# FIXME: Does not work when typing ./scripts/...
|
135
by logg
Tailorized "2003-05-06 15:31:45 by logg" |
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 |
||
136
by logg
Tailorized "2003-05-06 15:45:39 by logg" |
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
|
|
135
by logg
Tailorized "2003-05-06 15:31:45 by logg" |
23 |
done
|