I can't figure out how to escape backslashes in my run command...

task :flip_deploy_switch, :except => { :no_release => true } do
        run "sed -e 's/^\(DEPLOY =\).*/\1 #{deploy_settings_var}/g'
#{release_path}/settings.py.old > #{release_path}/settings.py"
end

yields

* executing "sed -e 's/^(DEPLOY =).*/\001 True/g' /usr/local/src/panda-
deploy/releases/20080131100217/settings.py.old > /usr/local/src/panda-
deploy/releases/20080131100217/settings.py"

but escaping the backslashes doesn't work either!

task :flip_deploy_switch, :except => { :no_release => true } do
    run "sed -e 's/^\\(DEPLOY =\\).*/\\1 #{deploy_settings_var}/g'
#{release_path}/settings.py.old > #{release_path}/settings.py"
end

yields
  * executing "sed -e 's/^\\(DEPLOY =\\).*/\\1 True/g' /usr/local/src/
panda-deploy/releases/20080131102405/settings.py.old > /usr/local/src/
panda-deploy/releases/20080131102405/settings.py"

What can I do??
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to