NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux contrib cdrom
Save this file as text file and chmod a+rx on it.
#!/bin/ksh
This script is deprecated -- use sadd instead...
################################################################
# Sample Program to checkin a directory tree (let's say SAMP) into CVS
# Note that if SAMP directory is not in CVS than you would use sadd
# command and -
# cd SAMP; cvs import SAMP V_1_0 R_1_0
# After running this program do -
# cd $HOME/foo/SAMP
# cvs import foo/SAMP V1_0 Rev_1_0
################################################################
homedir=` echo $HOME | cut -f1 -d' ' `
if [ "$homedir" = "" ]; then
print "\nError: \$HOME is not set!!\n"
exit
fi
sampdir=$homedir/foo/SAMP
check_out_files()
{
# Now check out the files
tmp2f=$homedir/tmp2.baksamp.sh
cd $homedir
\rm -rf foo/SAMP
cvs -w checkout foo/SAMP
cd $homedir/foo
find SAMP -type f -print > $tmp2f
cd $homedir
for ii in `cat $tmp2f`
do
iidir=`dirname $ii`
iifile=`basename $ii`
if [ "$iifile" = "Root" -o "$iifile" = "Repository" -o "$iifile" = "Entries" ]; then
continue
fi
jjdir=` echo $iidir | cut -d'/' -f2-1000 `
cp $homedir/foo/SAMP.tobe/$jjdir/$iifile $homedir/foo/$iidir/$iifile
echo "cp $homedir/foo/SAMP.tobe/$jjdir/$iifile $homedir/foo/$iidir/$iifile "
cvs add foo/$iidir/$iifile
done
print
print "================================================"
print " Now run cvs commit foo/SAMP"
print " After commit. Do - "
print " cd foo; rm -rf SAMP and "
print " get fresh copy, sget SAMP"
print " Verify with slog filename.samp to see new revision"
print "================================================"
print
}
check_out_files