m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-02-08 11:56:32 -0800
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-02-08 11:56:32 -0800
commitaa503dd5397cb358a1b88b5b9c26aa47e3bd1a95 (patch)
tree6dc850a5e04b1e4d4148f5417caf3745b582341f /lib
parent4de89ab2216d0b1918413ee34cf0d1f91e44ec66 (diff)
Allow copying statics in deeper directories
Diffstat (limited to 'lib')
-rw-r--r--lib/statics.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/statics.rb b/lib/statics.rb
index 3865439..520e213 100644
--- a/lib/statics.rb
+++ b/lib/statics.rb
@@ -1,7 +1,8 @@
def write_statics statics
- statics = statics.map do | filename |
- src filename
+ statics = statics.each do | filename |
+ source = src filename
+ target = build filename
+ FileUtils.mkdir_p(File.dirname target)
+ FileUtils.cp_r source, target
end
-
- FileUtils.cp statics, BuildDir
end