commit_hookr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/hookr +3 -1
- metadata +2 -2
data/bin/hookr
CHANGED
@@ -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
|
-
|
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."
|