#!/bin/sh 
# Convert sccs files to rcs files.
# Robert E. Bruccoleri, Bristol-Myers Squibb Pharmaceutical Research Institute
#
# Usage: sccstorcs files
# where files are without the `s.' prefix.

if [ ! -d RCS ]
then 
    rm -rf RCS
    mkdir RCS
fi

echo Descriptive text:
read text

for f 
do
    for rev in `prs -d:I: -l -r1.1 s.${f} | sort +0.2 -n` 
    do
	if [ -w ${f} ] 
	then
	    rm ${f}
	fi
	get -r${rev} s.${f}
	ci -l -t-"${text}" "-mRevision ${rev}: `prs -d:C: -r${rev} s.${f}`" ${f}
    done
done
