You should use: run <<-EOB # your bash code here EOB
That's a ruby style heredoc. -- Lee Hambley Twitter: @leehambley | @capistranorb Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 On 23 February 2010 00:23, Joshua J. Kugler <[email protected]> wrote: > On Sunday 14 February 2010, Lee Hambley elucidated thus: > > Joshua, > > > > That is a strange behavior - I do typically find that the `run` > > formatting for long complex shell scripts sucks pretty hard, and it's > > often better- in this case to do something like this with rake, and > > defer to the rake task after it's been deployed. > > > > I'm sorry that's not the answer you were looking for! > > I figured it out. Since it is passing the commands to sh -c, apparently > the newlines don't count as statement terminators. So, even though > there are newlines in the code, you still have to put ; at the end of > each of your statements. Then it works fine. It also works to simply > use multiline statements such as > > run " > . > . > . > " > > as long as you don't have any " in your code. > > Hope that helps someone! > > j > > -- > Joshua Kugler > Part-Time System Admin/Programmer > http://www.eeinternet.com > PGP Key: http://pgp.mit.edu/ ID 0x14EA086E > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected]<capistrano%[email protected]>For > more options, visit this group at > http://groups.google.com/group/capistrano?hl=en > -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
