Skip to content

Instantly share code, notes, and snippets.

@matthewrudy
Created January 20, 2009 15:31
Show Gist options
  • Save matthewrudy/49518 to your computer and use it in GitHub Desktop.
Save matthewrudy/49518 to your computer and use it in GitHub Desktop.
set :site_path, Proc.new { Capistrano::CLI.ui.ask "Site to export (e.g. 'all', 'JGP' etc.): " }
# we don't want exporting all sites if nothing is provided
# that would be a costly mistake...
raise ArgumentError, "Site path must be specified" if site_path == ""
# site_path here is whatever we specify, 'JGP' for example
# if 'all' was provided, reset site_path to .../sites/
site_path = "" if site_path == "all"
# it becomes "" here EVEN if site_path != "all"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment