Skip to content

Commit

Permalink
skip over identical files on install
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Mar 3, 2010
1 parent 3e0f0ae commit fa90385
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ task :install do
next if %w[Rakefile README.rdoc LICENSE].include? file

if File.exist?(File.join(ENV['HOME'], ".#{file.sub('.erb', '')}"))
if replace_all
if File.identical? file, File.join(ENV['HOME'], ".#{file.sub('.erb', '')}")
puts "identical ~/.#{file.sub('.erb', '')}"
elsif replace_all
replace_file(file)
else
print "overwrite ~/.#{file.sub('.erb', '')}? [ynaq] "
Expand Down

0 comments on commit fa90385

Please sign in to comment.