mirror of
https://git.rtems.org/rtems-docs/
synced 2025-10-19 10:35:09 +08:00
Move images to a common directory.
This commit is contained in:
@@ -119,17 +119,29 @@ def doc_singlehtml(ctx, source_dir, conf_dir):
|
||||
|
||||
|
||||
def html_resources(ctx):
|
||||
for dir in ["_static", "_templates"]:
|
||||
files = ctx.path.parent.find_node("common").ant_glob("%s/*" % dir)
|
||||
ctx.path.get_bld().make_node(dir).mkdir() # dirs
|
||||
for dir_name in ["_static", "_templates"]:
|
||||
files = ctx.path.parent.find_node("common").ant_glob("%s/*" % dir_name)
|
||||
ctx.path.get_bld().make_node(dir_name).mkdir() # dirs
|
||||
|
||||
ctx(
|
||||
features = "subst",
|
||||
is_copy = True,
|
||||
source = files,
|
||||
target = [ctx.bldnode.find_node(dir).get_bld().make_node(x.name) for x in files]
|
||||
target = [ctx.bldnode.find_node(dir_name).get_bld().make_node(x.name) for x in files]
|
||||
)
|
||||
|
||||
# copy images
|
||||
# ctx.path.get_bld().make_node("images").mkdir()
|
||||
# files = ctx.path.parent.ant_glob("images/**")
|
||||
# ctx(
|
||||
# features = "subst",
|
||||
# is_copy = True,
|
||||
# source = files,
|
||||
# target = [x.srcpath().replace("../", "") for x in files]
|
||||
# )
|
||||
|
||||
|
||||
|
||||
|
||||
def cmd_build(ctx, conf_dir=".", source_dir="."):
|
||||
srcnode = ctx.srcnode.abspath()
|
||||
|
Reference in New Issue
Block a user