File: notinuse

package info (click to toggle)
dolfin 2018.1.0.post1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,764 kB
  • sloc: xml: 104,040; cpp: 98,856; python: 22,511; makefile: 204; sh: 182
file content (23 lines) | stat: -rwxr-xr-x 671 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# notinuse
#
# Scan subdirectories for files that may not be in use,
# that is, old files that should be removed.
#
# This script should be run from the top level directory.
                                                                                                    
# Simple test to see where we are
# FIXME: Does not work when typing ./scripts/...
CHECK=`echo $0 | cut -d'/' -f1`
if [ "$CHECK" != "scripts" ]; then
        echo "This script must be run from the top level directory."
        exit 1
fi

for f in `find . -name '*.h' -printf '%f '`; do
	a=`rgrep $f * | grep include`
	if [ "x$a" == "x" ]; then
		echo File $f may not be used.
	fi
done