Skip to content

Commit

Permalink
dont symlink if none defined
Browse files Browse the repository at this point in the history
  • Loading branch information
marten committed Jan 15, 2012
1 parent db64c07 commit 0c46387
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions config/deploy/symlinks.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
namespace :symlinks do
desc "Make all the damn symlinks"
task :make, :roles => :app, :except => { :no_release => true } do
commands = shared_symlinks.map do |from, to|
"ln -sf #{shared_path}/#{from} #{current_path}/#{to}"
end
if shared_symlinks.any?
commands = shared_symlinks.map do |from, to|
"ln -sf #{shared_path}/#{from} #{current_path}/#{to}"
end

run <<-CMD
cd #{current_path} && #{commands.join(" && ")}
CMD
run <<-CMD
cd #{current_path} && #{commands.join(" && ")}
CMD
end
end
end

Expand Down

0 comments on commit 0c46387

Please sign in to comment.