[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CVS environment constants



On Fri, Jun 22, 2001 at 02:53:43PM -0700, MRZ wrote:
> Hello again.
> Just wondering if there is a standard way to store the cvs constants
> (e.g. CVS_RSH) such that terminals automagically "see" them when
> opened. I'm using one of three terms with eterm as my favorite, so the
> solution would hopefully be a one-step which would be used by all (the
> terminal that it).

~/.bashrc ?  I have a little function in my ~/.bashrc so I can switch
between various cvs environments:  Something like:

#CVS repositories
setcvs() {
case "$1" in 
    foo)
        echo -n "Setting CVS for foo"
        export CVSROOT=":pserver:foo@bar.com:/home/foobar/"
        export CVS_RSH=""
        echo "."
        ;;
    finch)
        echo "Setting CVS for finch Development..."
        export CVSROOT=":ext:darwin@galapagos.com:/birds"
        export CVS_RSH="$HOME/bin/finch.sh"
        eval `ssh-agent`
        ssh-add
        echo "Done."
        ;;
    *)
        echo -n "Setting default local CVS"
        export CVSROOT="$HOME/cvsroot"
        export CVS_RSH=""
        echo "."
        ;;
esac
}

Then I just call "setcvs foo" for instance... "$HOME/bin/finch.sh" 
would be a script like "#! /bin/sh \n ssh -p 1234 $*"

-- 
Eric G. Miller <egm2@jps.net>



Reply to: