Rakefile: Fixed broken copy in install_app

Seems like File.copy doesn't do directories (as source, that is),
only files (as far as I can tell from reading the docs and trying
it in irb, punch me if I'm wrong). It only creates a zero byte file
in the target directory on my system.

Replaced File.copy with a system call to 'cp -R ...' to do the job.
Seems like FileUtils could have done it just as well (with cp_r),
but I figured making a system call was better than introducing a
new dependency.
This commit is contained in:
Martin Svangren
2008-12-01 23:40:19 +01:00
committed by Pieter de Bie
parent 0852f6326c
commit 41154efa15
+1 -1
View File
@@ -26,7 +26,7 @@ task :install_app do
target_locations.each do |loc|
if File.directory?(loc)
puts "Copying to (#{loc})"
File.copy("build/Release/GitX.app/", loc)
system("cp -R build/Release/GitX.app #{loc}")
break
end
end