Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 7e9b96014bfb280d98efe1556db639ecf4051101 1 parent 74af681
Michael Bumann bumi authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 bin/hookr
4 bin/hookr
@@ -9,6 +9,8 @@ require "fileutils"
9 9
10 10 FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/commit-msg.rb", "#{FileUtils.pwd}/.git/hooks/commit-msg")
11 11 FileUtils.chmod 0755, "#{FileUtils.pwd}/.git/hooks/commit-msg"
12   -FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/#{ARGV[0]}.rb", "#{FileUtils.pwd}/.hookr")
  12 +unless File.exist?("#{FileUtils.pwd}/.hookr")
  13 + FileUtils.cp("#{File.dirname(__FILE__)}/../lib/templates/#{ARGV[0]}.rb", "#{FileUtils.pwd}/.hookr")
  14 +end
13 15
14 16 puts "Yo dawg I herd u like commit hooks, so I put some files in ur directories."

0 comments on commit 7e9b960

Please sign in to comment.
Something went wrong with that request. Please try again.