sccs 2 rcs

Charles Steinkuehler charles at steinkuehler.net
Tue Feb 24 17:29:11 CST 2004


Ben Coffman wrote:
> This is a good idea, but within the sccs2rcs script it creates a RCS and an 
> OLD-SCCS directory.  The sccs2rcs script automatically assumes that all my 
> old sccs files are going to be in one flat folder and no subdirectories.  
> Conseqently in each folder if it does not locate a RCS or OLD-SCCS directory 
> it creates these folders in which the "find" goes into and then it creates 
> the folders again, thus causing a never ending recursive loop.

<snip>

> Find is your friend...try:
> 
> $find /code-archive -type d -exec sccs2rcs {} ;
> 
> (assumes you can run "sccs2rcs <dir>" and have <dir> converted to cvs 
> format).

You can still use find, you'll just have to be a bit fancier about it.

I'd probably do something like:

$find /code-archive -type d | grep -v RCS | grep -v OLD-SCCS |
   xargs -n 1 sccs2rcs

Of course, you should check the output of the find/grep pipeline before 
blindly running sccs2rcs on it.  If that doesn't work for you, I'd just 
make a directory tree with find, tweak whatever you do/don't want to 
convert with the editor of your choice (not trying to start any vi/emacs 
flame wars!), and then run sccs2rcs:

while read LINE ; do
   sccs2rcs $LINE
done < directory.list

-or-

cat directory.list | xargs -n 1 sccs2cvs

...of course, this whole excerscise is probably a 3 character perl 
script, but I grok shell, not perl, so just get shell hints from me 
unless some perl jockies decide to chime in.  :)

-- 
Charles Steinkuehler
charles at steinkuehler.net




More information about the Kclug mailing list