#!/bin/sh -x
#
# newelem eltname
#
# This makes a new ClearCase element with the given name.  The basename  must
# be  a  file  in the current directory; its contents will become the initial
# contents of the element, which will be checked in with $C as  its  comment.
# For example:
#    newelem /vobs/nm/cmagent/src/f_bar.b
# This will make a new element f_bar.b in the given directory; copy the local
# f_bar.b file to /vobs/nm/cmagent/src/f_bar.b, and check it in.

C='-c "New file"'

for f
do
	F=`basename $f`
	if cleartool mkelem -eltype text_file $C $f ;then
		cp $F $f
		cleartool ci $C $f 
	else
		echo "### Can't create element" $f
	fi
done
