home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1158 < prev    next >
Internet Message Format  |  1990-12-28  |  1KB

  1. From: ron@rdk386.uucp (Ron Kuris)
  2. Newsgroups: alt.sources
  3. Subject: Converting sccs to rcs
  4. Message-ID: <1990Apr10..9143@rdk386.uucp>
  5. Date: 10 Apr 90 13:21:48 GMT
  6.  
  7.  
  8. Here is a bourne/korn shell function to convert sccs files to rcs
  9. files.  I've tried it on quite a few and it seems to work well.
  10.  
  11. This puppy converts the comments and maintains the version numbers
  12. too!  Just pass it all the s.* files and it produces ,v files for
  13. you.  If you create an RCS directory, the files will be placed there.
  14. Otherwise, they'll be in your current directory.
  15.  
  16. Also note you'll get an error during the initial 'co' of the file
  17. that hasn't been started yet.  This is normal and can be ignored.
  18. (actually, somebody fix it and keep it fast, please).
  19.  
  20. sccs2rcs()
  21. {
  22. for arg
  23. do
  24.     if expr "$arg" : '^s.*' >/dev/null 2>&1; then
  25.     arg=`expr "$arg" : 's.\(.*\)'`
  26.     fi
  27.     for i in `prs -e -d:R:.:L: s.$arg | sort -n`
  28.     do
  29.     co -l -r$i $arg
  30.     rm -f $arg
  31.     get -r$i s.$arg
  32.     ci -r$i -m"`prs -r$i -d:C: s.$arg`" $arg < /dev/null
  33.     done
  34. done
  35. }
  36. -- 
  37. --
  38. ...!pyramid!unify!rdk386!ron -or- ...!ames!pacbell!sactoh0!siva!rdk386!ron
  39. It's not how many mistakes you make, its how quickly you recover from them.
  40.