95130cb61163

Blindly copy entire resources directory
[view raw] [browse files]
author Mattijs Hoitink <mattijs@monkeyandmachine.com>
date Mon, 06 Feb 2012 15:59:43 +0100
parents ee62f412c6ef
children b3fb6bc34867
branches/tags (none)
files d/base.py

Changes

--- a/d/base.py	Mon Feb 06 15:45:14 2012 +0100
+++ b/d/base.py	Mon Feb 06 15:59:43 2012 +0100
@@ -83,9 +83,6 @@
             if name not in ['footer', 'index']:
                 yield filename
 
-def _copy_raw_file(filename):
-    shutil.copyfile(j(up(__file__), 'resources', filename),
-                    j(BUILD_LOC, '_dmedia', filename))
 
 def _get_footer():
     if os.path.isfile('./footer.markdown'):
@@ -242,7 +239,9 @@
     title = _get_project_title()
     footer = _get_footer()
 
-    map(_copy_raw_file, ['bootstrap.css', 'style.less', 'less.js', 'tango.css'])
+    resources = j(up(__file__), 'resources')
+    for filename in os.listdir(j(up(__file__), 'resources')):
+        shutil.copyfile(j(resources, filename), j(destination, '_dmedia', filename))
 
     chapters = []
     for filename in _find_chapters():