lib/tap/generator/generate.rb in tap-gen-0.7.0 vs lib/tap/generator/generate.rb in tap-gen-0.7.1
- old
+ new
@@ -26,11 +26,11 @@
when target == Dir.pwd
when File.exists?(target)
log_relative :exists, target
else
log_relative :create, target
- FileUtils.mkdir_p(target) unless pretend
+ FileUtils.mkdir_p(target, :mode => 0755) unless pretend
end
target
end
@@ -63,11 +63,12 @@
end
log_relative msg, target
if copy_file && !pretend
dir = File.dirname(target)
- FileUtils.mkdir_p(dir) unless File.exists?(dir)
+ FileUtils.mkdir_p(dir, :mode => 0755) unless File.exists?(dir)
FileUtils.mv(source, target, :force => true)
+ FileUtils.chmod(0644, target)
end
target
end