#!/bin/ksh #set -x start_secs=$SECONDS export ii=$II export i=$I tag=$1 dir=$2 if [[ -z "$dir" ]] ; then echo "Must give dir" >&2 exit 1 fi cd $ii/$dir if (( $? != 0 )) ; then echo "Cannot cd to $ii/$dir" >&2 exit 1 fi #test tmpa=$ii/tmpa tmpa=$ii/whyall if [[ -n "$tag" ]] ; then tag_parms="-r $tag" fi $CVS_LOC/cvs update -P $tag_parms . > $tmpa 2>&1 if (( $? != 0 )) ; then echo "Cannot cvs $ii/$dir" >&2 grep -q ' src/java/com/hp' $tmpa 2>&1 if (( $? == 0 )) ; then echo "Get src from cvs for $ii/$dir continuing" else echo "Cannot cvs $ii/$dir" >&2 more $tmpa exit 1 fi fi /bin/grep '^?' $tmpa | \ /bin/sed -e "s#^. #:!\$I/addcvs.ksh $dir/#g" > ../whyadd /bin/grep '^[PU]' $tmpa | \ /bin/sed -e "s#^. #:!\$I/synccvs.ksh $dir/#g" > ../whyupd /bin/grep '^[?ACM]' $tmpa | \ /bin/sed -e "s#^. #:!\$I/commitcvs.ksh -r \"$tag\" $dir/#g" > ../whycmt echo "\":e! whycvs.diff" > ../whydiff echo ":!rm -f whycvs.diff" >> ../whydiff /bin/grep '^M' $tmpa | \ /bin/sed -e "s#^. #:!\$I/diffcvs.ksh $dir/#g" >> ../whydiff end_secs=$SECONDS echo \ "ELAPSED=$(( (end_secs - start_secs)/60 )):$(( (end_secs - start_secs)%60 ))"