User:Scsbot/formtools/formcheckfields

From Wiktionary, the free dictionary
Jump to navigation Jump to search
tag=$1
shift

# could optimize this by doing in-line, rather than calling formgettmpfile

exitstat=0

for fieldname in $*
do
	x=`formgettmpfile $tag $fieldname`
	if test -z "$x"
	then
		# formgettmpfile might eventually print err msg
		echo "$tag: field $fieldname not found" >&2
		exitstat=1
	fi
done

exit $exitstat