9 # Remove target files for which no sources files can be found.
10 for file in "$metadata_dir"/*.intermediate; do
11 basename=$(basename "$file")
13 ! test -f "${basename%.intermediate}.md" &&
14 ! test -f "${basename%.intermediate}.rst"; then
18 for file in "$metadata_dir"/*.uuid; do
19 basename=$(basename "$file")
21 ! test -f "${basename%.uuid}.md" &&
22 ! test -f "${basename%.uuid}.rst"; then
26 for file in *.html; do
28 ! test "$file" = "index.html" &&
29 ! test -f "${metadata_dir}/${file%.html}.intermediate"; then
34 # Determine target files from the sources files present, declare dependencies
35 # of the all.do script on them / build them if necessary.
36 for file in *.rst *.md; do
37 if test -f "$file"; then
38 redo-ifchange "${metadata_dir}/${file%.*}.intermediate"
39 html_file=${file%.*}.html
40 redo-ifchange "$html_file"
41 ln -sf "$cur_dir/$html_file" "${public_dir}/"
45 # Regenerate feed and index pages. Always.
47 ln -sf "$cur_dir"/feed.xml "${public_dir}/"
49 ln -sf "$cur_dir"/index.html "${public_dir}/"