On 2008.07.23 10:07:10 +0200, Tommy Pettersson <[EMAIL PROTECTED]> scribbled
1.6K characters:
> On Tue, Jul 08, 2008 at 06:39:57PM -0400, Gwern Branwen wrote:
> > Hi everyone. So I recently decided to move all my Darcs
> > configuration out of my elaborate and unwieldy shell scripts,
> > and into my ~/.darcs/defaults. For the most part, it has gone
> > alright.
> >
> > However, I've run into trouble with more complex things. For
> > example, with my send function. It looked like this:
> >
> > function send { local -r http_proxy=""; darcs send -v --summary
> > --from=`gpg-address` --sendmail-command="torify ssmtp -au `gpg-address` -ap
> > `gpg-password` %t %<" "$@" }
> [...]
> > Trying:
> > send sendmail-command torify ssmtp -au `gpg-address` -ap `gpg-password` %t
> > %<
> >
> > results in:
> > ssmtp: Authorization failed (535 5.7.1
> > http://mail.google.com/support/bin/answer.py?answer=14257 34sm8069819yxl.9)
> >
> > darcs failed: failed to send mail to: [EMAIL PROTECTED]
> > Perhaps sendmail is not configured.
>
> The value to --sendmail-command is not executed by the shell. It
> is parsed by darcs and executed as a raw command, so the
> backquotes will not have any effect. Otherwise your last try
> (quoted above) is the correct way to enter the value for
> --sendmail-command; only single arguments that contain spaces
> need to be quoted in singlequotes, like:
>
> send sendmail-command touch -d 2008-08-01 'spacy file stamp'
>
> You could try something like:
>
> send sendmail-command sh -e 'torify ssmtp -au `gpg-address` ... '
>
> but I have not checked if that really works.
>
> --
> Tommy Pettersson <[EMAIL PROTECTED]>No, I've banged my head some more, and that doesn't work. I think the issue is that if you call sh -e (sh -c, it seems to be actually), it runs and is evaluated, but then it doesn't have access to %t or %<. I haven't seen anyway to substitute in the output of gpg-password & gpg-address & %t & %v into the final shell command. -- gwern EDI Halliburton BRGE UHF JITEM composition high explosion EODG quarter
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
