Skip to main content
  1. Posts/

Changing CVS Root from shell

·60 words·1 min

Here’s a simple script that recursively changes CVS/Root files in the project tree

find . -name Root -exec sh -c 'echo :pserver:example@cvs.example.com:2401/var/cvsroot 
> {}' \;

Note sh -c segment of -exec switch, which is necessary in order to successfully redirect to appropriate files.

This could be useful for updating deployed projects with the repository that has moved (for any reason).