Permalink
Browse files

overwrites.rb symlink files/ totaly instead of sub folders

  • Loading branch information...
1 parent efdf0b3 commit 841c456c760fbb6cb31da43cec6538e33d76fbff Tijs Vindevogel committed Sep 24, 2013
Showing with 6 additions and 13 deletions.
  1. +6 −13 deployment/overwrites.rb
View
19 deployment/overwrites.rb
@@ -67,18 +67,11 @@
ln -sf #{shared_path}/config/library/globals.php #{release_path}/library/globals.php
}
- folders = capture("ls -1 #{release_path}/files").split(/\r?\n/)
-
- # loop the folders
- folders.each do |folder|
- # copy them to the shared path, remove them from the release and symlink them
- run %{
- mkdir -p #{shared_path}/files/#{folder} &&
- cp -r #{release_path}/files/#{folder} #{shared_path}/files/ &&
- rm -rf #{release_path}/files/#{folder} &&
- ln -s #{shared_path}/files/#{folder} #{release_path}/files/#{folder}
- }
- end
+ # Symlink the files
+ run %{
+ rm -rf #{release_path}/files &&
+ ln -sf #{shared_path}/files #{release_path}/files
+ }
end
rescue LoadError
@@ -88,4 +81,4 @@
gem install forkcms_deploy
INSTALL
exit 1
-end
+end

0 comments on commit 841c456

Please sign in to comment.