commit_hookr 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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."
|