2

Mac OS 10.7.4

I need to checkout ~70 cvs projects so I have script like this:

#!/bin/bash

cvs checkout proj1
cvs checkout proj2
cvs checkout proj3

....

cvs ckeckout proj75

But when I execute it I have an error message:

cvs checkout: No CVSROOT specified! Please use the '-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.

When I write manualy cvs checkout proj1 in works.

ECHO $CVSROOT
:pserver:mylogin@server:port/repository

Would appreciate any hints to solve this issue.

Zoe
  • 27,060
  • 21
  • 118
  • 148
pomkine
  • 1,605
  • 4
  • 18
  • 29

1 Answers1

3

Try setting the "$CVSROOT" explicitly in your shell script and see if that makes a difference.

It may be that you're launching another shell (i.e. "bash") and the environment variables from your current shell, whatever it is, aren't being copied into your bash environment.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • 3
    Or you have set `CVSROOT` but not `export`ed it, which means child processes will not inherit it. – tripleee Aug 01 '12 at 10:28