[Capistrano] Re: Changing directory in task

2008-10-08 Thread Jamis Buck
Each run() is done in a subshell, so any changes made to your session's state there are lost. Similarly, you cannot set environment variables that you want to persist across run calls, either. The way to do this is to execute all the commands together in a single run() invocation: run

[Capistrano] Downloading a directory or glob?

2008-10-08 Thread Peter Booth
First: Capistrano is awesome, it is for sysadmin like regex is to text processing . Clearly something where the benefits increase geometrically with experience. Second: is there a way to download a directory tree or glob? A scenario might be retrieving configuration files that were never

[Capistrano] Re: Downloading a directory or glob?

2008-10-08 Thread David Masover
It seems unlikely that you'd be able to do a glob -- or at least, not a Ruby glob. Remember that Capistrano is only running on the local host -- the other end doesn't even need to have Ruby installed. Ah -- Jamis replied as I typed. Looks like you can download a tree. I would also guess that you

[Capistrano] Re: Downloading a directory or glob?

2008-10-08 Thread Jamis Buck
Peter, You can use download to grab a directory tree as well, but not a glob. However, it is a LOT slower than simply creating a tgz file on the server and downloading that. download /opt/nginx/conf, existing/$CAPISTRANO:HOST$ - Jamis On Oct 8, 2008, at 8:04 AM, Peter Booth wrote:

[Capistrano] Changing directory in task

2008-10-08 Thread thomas.mery
Hello all, Maybe this ha been answered before but could not find the solution ... I simply want to change directory within a task to be able to run a command in a specific directory but it fails here is my test task : desc TEST task :test do run cd /home/myaccount/mydirectory