85 for dirpath, dirnames, filenames in os.walk(datadir): |
85 for dirpath, dirnames, filenames in os.walk(datadir): |
86 rel_dirpath = dirpath[len(datadir)+1:] |
86 rel_dirpath = dirpath[len(datadir)+1:] |
87 resources.update(osp.join(rel_dirpath, f) for f in filenames) |
87 resources.update(osp.join(rel_dirpath, f) for f in filenames) |
88 # locate resources and copy them to destination |
88 # locate resources and copy them to destination |
89 for resource in resources: |
89 for resource in resources: |
90 dirname = osp.dirname(resource) |
90 dest_resource = osp.join(dest, resource) |
91 dest_resource = osp.join(dest, dirname) |
91 dirname = osp.dirname(dest_resource) |
92 if not osp.isdir(dest_resource): |
92 if not osp.isdir(dirname): |
93 os.makedirs(dest_resource) |
93 os.makedirs(dirname) |
94 resource_dir, resource_path = config.locate_resource(resource) |
94 resource_dir, resource_path = config.locate_resource(resource) |
95 copy(osp.join(resource_dir, resource_path), dest_resource) |
95 copy(osp.join(resource_dir, resource_path), dest_resource) |
96 # handle md5 version subdirectory |
96 # handle md5 version subdirectory |
97 linkdir(dest, osp.join(dest, config.instance_md5_version())) |
97 linkdir(dest, osp.join(dest, config.instance_md5_version())) |
98 print ('You can use apache rewrite rule below :\n' |
98 print ('You can use apache rewrite rule below :\n' |