blob: 26e730239b702c1dd662bf24e85e5ad3365e8c7c [file] [log] [blame]
#!/bin/sh
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
# Clean a location (directory)
DIR="$1"
if [ "$#" -gt 1 -o -z "$DIR" -o "$DIR" = "-h" -o "$DIR" = "-h" ]
then
echo "Usage: $(basename $0) DIRECTORY" 1>&2
exit 0
fi
if [ ! -d "$DIR" ]
then
echo "Not a directory: $DIR" 1>&2
exit 1
fi
# Don't remove subdirectories or prefix files.
rm -f "$DIR"/*.idn
rm -f "$DIR"/*.idx
rm -f "$DIR"/*.dat