#! /bin/ksh
ct=cleartool
comment=-nc
LOG=/tmp/cc_ciall.log$$
STD=/tmp/cc_ciall.std$$
let RET=0
function exp_text {
cat <<.END
cleartool: Error: By default, won't create version with data identical to predecessor.
cleartool: Error: Unable to check in "$1".
.END
}
for i in `$ct lsco -r -s -me -cview`
do
	if $($ct ci $comment "$i" > $STD 2> $LOG)
	then cat $STD
	else
		if [ "$(<$LOG)" = "$(exp_text $i)" ]
		then $ct unco -rm $i
		else cat $LOG; RET=1
		fi
	fi
	rm -f $LOG $STD
done

exit $RET
