Dear all,
I am trying to write a shell script that creates a ssh tunnel to a remote server and checks out a module from a CVS repository. The problem is that the tunnel creation blocks the terminal. That means I have to wait for a moment till the tunnel is established and than apply the CVS commands on a different terminal. How can this be done with a shell script such that the process can be automatic? I already tried to put an ampersand after the ssh line, but then the connection is aborted at the time the CVS commands are entered. Thanks in advance.
Siebbel
This is what I tried:
I am trying to write a shell script that creates a ssh tunnel to a remote server and checks out a module from a CVS repository. The problem is that the tunnel creation blocks the terminal. That means I have to wait for a moment till the tunnel is established and than apply the CVS commands on a different terminal. How can this be done with a shell script such that the process can be automatic? I already tried to put an ampersand after the ssh line, but then the connection is aborted at the time the CVS commands are entered. Thanks in advance.
Siebbel
This is what I tried:
Code:
ssh -L 2401:localhost:2401 user@somewhere.com & sleep 10 export CVSROOT=:pserver:cvs@localhost:/data/cvs cvs update -d module &
Comment