#!/bin/sh
# This is just a simple wrapper for the various
# commands. In the works is a GUI which will allow
# much easier processing of the results of the various
# commands. This assumes all commands are in same dir.

. fslver

Usage() {
	ProgName=`basename "$0"`
	echo "File system lint.
A collection of utilities to find lint on a filesystem.
To get more info on each utility run 'util --help'.

findup	find DUPlicate files
findnl	find Name Lint (problems with filenames)
findbl	find Bad Links (various problems with symlinks)
findsn	find Same Name (problems with clashing names)
finded	find Empty Directories
finded	find Dead IDs
findns	find Non Stripped executables
findrs	find Redundant Whitespace in files <-
findtf	find Temporary Files
findul	find possibly Unused Libraries
zipdir	Reclaim wasted space in ext2 directory entries"
	exit
}

for arg
do
	case "$arg" in
	-h|--help|-help)
		Usage ;;
	-v|--version)
		Version ;;
	esac
done

echo "-----------------------------------file Name Lint"
./findnl $@
echo "-----------------------------------file case lint"
./findsn -c $@
echo "----------------------------------DUPlicate files"
./findup $@
echo "-----------------------------------Dangling links"
./findbl $@
echo "--------------------redundant characters in links"
./findbl -n $@
echo "------------------------------------suspect links"
./findbl -s $@
echo "--------------------------------Empty Directories"
./finded $@
echo "----------------------------------Temporary Files"
./findtf $@
echo "----------------------duplicate/conflicting Names"
if [ "$1" = "/" ]; then
    ./findsn
else
    ./findsn $@
fi
echo "------------------------------------------Bad ids"
./findid $@
echo "-------------------------Non Stripped executables"
if [ "$1" = "/" ]; then
    ./findns
else
    ./findns $@
fi
