Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't overwrite .hookr file if we already have configured one

  • Loading branch information...
commit 7e9b96014bfb280d98efe1556db639ecf4051101 1 parent 74af681
Michael Bumann bumi authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 bin/hookr
4 bin/hookr
View
@@ -9,6 +9,8 @@ require "fileutils"
FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/commit-msg.rb", "#{FileUtils.pwd}/.git/hooks/commit-msg")
FileUtils.chmod 0755, "#{FileUtils.pwd}/.git/hooks/commit-msg"
-FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/#{ARGV[0]}.rb", "#{FileUtils.pwd}/.hookr")
+unless File.exist?("#{FileUtils.pwd}/.hookr")
+ FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/#{ARGV[0]}.rb", "#{FileUtils.pwd}/.hookr")
+end
puts "Yo dawg I herd u like commit hooks, so I put some files in ur directories."
Please sign in to comment.
Something went wrong with that request. Please try again.