zsh-users
 help / color / mirror / code / Atom feed
* More general zsh-scripting question
@ 2005-05-22  5:00 Meino Christian Cramer
  2005-05-22  9:03 ` Andrey Borzenkov
  2005-05-22 12:11 ` Hannu Koivisto
  0 siblings, 2 replies; 4+ messages in thread
From: Meino Christian Cramer @ 2005-05-22  5:00 UTC (permalink / raw)
  To: zsh-users

Hi,

 for several software porjects avaible on the net I regulary update
 via cvs.

 Most of that projects dont need a password to login into their public
 cvs servers. Nonetheless it is tidy when you just wnat to run a
 couple of projects to press <RETURN> every time when asked for
 login:

 I am looking for a method to feed this <RETURN> into the login:
 prompt.

 For example these two lines are part of a function defined inside a script: 

 cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd login
 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd update -d cvs-snd
 index=1


 When the second line is executed, the login: prompt stops execution
 of the script and waits for the <RETURN>.

 Is there a way to automate this ?

 Thank you very much for any help in advance! :O)

 Have a nice weekend!
 Meino


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More general zsh-scripting question
  2005-05-22  5:00 More general zsh-scripting question Meino Christian Cramer
@ 2005-05-22  9:03 ` Andrey Borzenkov
  2005-05-22 11:13   ` Meino Christian Cramer
  2005-05-22 12:11 ` Hannu Koivisto
  1 sibling, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2005-05-22  9:03 UTC (permalink / raw)
  To: zsh-users; +Cc: Meino Christian Cramer

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

On Sunday 22 May 2005 09:00, Meino Christian Cramer wrote:
>  For example these two lines are part of a function defined inside a
> script:
>
>  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd login
>  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd update -d
> cvs-snd index=1
>

Why do you need cvs login in script? You only have to do login once, then CVS 
remembers login/password/repository combination and does not ask for it 
anymore.

>
>  When the second line is executed, the login: prompt stops execution
>  of the script and waits for the <RETURN>.
>
>  Is there a way to automate this ?
>

if you still insist on it

expect
zpty module that is part of zsh

zsh has some examples of using zpty to drive interactive programs, like 
nslookup wrapper.

-andrey

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More general zsh-scripting question
  2005-05-22  9:03 ` Andrey Borzenkov
@ 2005-05-22 11:13   ` Meino Christian Cramer
  0 siblings, 0 replies; 4+ messages in thread
From: Meino Christian Cramer @ 2005-05-22 11:13 UTC (permalink / raw)
  To: arvidjaar; +Cc: zsh-users

From: Andrey Borzenkov <arvidjaar@newmail.ru>
Subject: Re: More general zsh-scripting question
Date: Sun, 22 May 2005 13:03:04 +0400

> On Sunday 22 May 2005 09:00, Meino Christian Cramer wrote:
> >  For example these two lines are part of a function defined inside a
> > script:
> >
> >  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd login
> >  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd update -d
> > cvs-snd index=1
> >
> 
> Why do you need cvs login in script? You only have to do login once, then CVS 
> remembers login/password/repository combination and does not ask for it 
> anymore.

  As I mentioned I have a couple of projects from the net for which I
  do updates via cvs. Not all use the same cvs server. cvs only stores
  one login/password/repository combination.
 
> >
> >  When the second line is executed, the login: prompt stops execution
> >  of the script and waits for the <RETURN>.
> >
> >  Is there a way to automate this ?
> >
> 
> if you still insist on it
> 
> expect
> zpty module that is part of zsh
> 
> zsh has some examples of using zpty to drive interactive programs, like 
> nslookup wrapper.
> 
> -andrey

I will try that, thanks!

Meino


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More general zsh-scripting question
  2005-05-22  5:00 More general zsh-scripting question Meino Christian Cramer
  2005-05-22  9:03 ` Andrey Borzenkov
@ 2005-05-22 12:11 ` Hannu Koivisto
  1 sibling, 0 replies; 4+ messages in thread
From: Hannu Koivisto @ 2005-05-22 12:11 UTC (permalink / raw)
  To: Meino Christian Cramer; +Cc: zsh-users

Meino Christian Cramer <Meino.Cramer@gmx.de> writes:

>  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd login
>  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/snd update -d cvs-snd
>  index=1
>
>  When the second line is executed, the login: prompt stops execution
>  of the script and waits for the <RETURN>.
>
>  Is there a way to automate this ?

Login is not needed with a reasonably modern CVS client.  Try this
instead (without login):

cvs -z3 -d:pserver:anonymous:@cvs.sourceforge.net:/cvsroot/snd update -d cvs-snd

Note the ":" after "anonymous".

Meino Christian Cramer <Meino.Cramer@gmx.de> writes:

> From: Andrey Borzenkov <arvidjaar@newmail.ru>
>> Why do you need cvs login in script? You only have to do login once, then CVS 
>> remembers login/password/repository combination and does not ask for it 
>> anymore.
>
>   As I mentioned I have a couple of projects from the net for which I
>   do updates via cvs. Not all use the same cvs server. cvs only stores
>   one login/password/repository combination.

Huh?  Are you using some odd CVS client?  The standard CVS client
has stored an unlimited number of login/password/repository
combinations for as long as I can remember.

-- 
Hannu


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-22 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-22  5:00 More general zsh-scripting question Meino Christian Cramer
2005-05-22  9:03 ` Andrey Borzenkov
2005-05-22 11:13   ` Meino Christian Cramer
2005-05-22 12:11 ` Hannu Koivisto

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).