#!/bin/sh
# Deletes files of specified suffix under $STO
# $Id$
dependencySuffix="dep_mk"

while test $# -gt 0
do
	case "${1}" in
	-h | -help | --help)
		printf "usage: %s [--suffix type]\n" "${0}" >&2
		printf "  --suffix specifies file suffix, defaults to \"%s\"\n" "${dependencySuffix}" >&2
		exit 1
		;;
	--suffix)
		dependencySuffix="${2}"
		shift
		;;
	esac
	shift
done
if test -z "${STO}"
then
	printf "%s: STO environment variable not set, do a workon first\n" "${0}" >&2
	exit 1
fi

find -L "${STO}" -name '*.'"${dependencySuffix}" -print -exec rm -rf '{}' ';' 2>/dev/null
