diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-03-29 23:24:35 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-03-29 23:24:35 +0200 |
| commit | a9ec31367187bc0159100688e13400ca86b2709a (patch) | |
| tree | acffacad68843b10cfb7ab895af30402d61b0160 /repo/www/generate-deps.py | |
| parent | 006c863ee184389324d7346f65e93728d8d587b9 (diff) | |
| download | memory-leaks-a9ec31367187bc0159100688e13400ca86b2709a.tar.xz | |
Unify recipe for regular and automated indices
Also don't run pandoc in a pipeline within a Makefile recipe: pipefail
is not set, so generate-index.py failures will not be bubbled up.
Diffstat (limited to 'repo/www/generate-deps.py')
| -rwxr-xr-x | repo/www/generate-deps.py | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/repo/www/generate-deps.py b/repo/www/generate-deps.py index d88d333..f17e950 100755 --- a/repo/www/generate-deps.py +++ b/repo/www/generate-deps.py @@ -37,42 +37,26 @@ def pjoin(directory, item): def write_dependencies(deps_file, directories, top_dir, out_dir): pages = list() - indices = list() - autoindices = list() for dpath, d in directories.items(): - autoindex = True - src_dir = pjoin(top_dir, dpath) + html_dir = pjoin(out_dir, dpath) for f in d.files: src_path = path.join(src_dir, f) - name, _ = path.splitext(f) - deps = [src_path] - target = pages if name == 'README': - name = 'index' - deps.append(src_dir) - target = indices - autoindex = False + html_path = path.join(html_dir, 'index.html') + print(f'{html_path}: {src_path}', file=deps_file) + continue - html_dir = pjoin(out_dir, dpath) html_path = path.join(html_dir, name+'.html') - - print(f'{html_path}: {" ".join(deps)} | {html_dir}', file=deps_file) - target.append(html_path) - - if autoindex: - autoindices.append( - path.join(out_dir, dpath, 'index.html') - ) + print(f'{html_path}: {src_path} | {html_dir}', file=deps_file) + pages.append(html_path) print(file=deps_file) print(f'pages = {" ".join(pages)}', file=deps_file) - print(f'indices = {" ".join(indices)}', file=deps_file) - print(f'autoindices = {" ".join(autoindices)}', file=deps_file) def main(arguments): |
