home
·
contact
·
privacy
projects
/
redo-blog
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unhide metadata directory, move helpers script up in tree.
[redo-blog]
/
processor
/
all.do
diff --git
a/processor/all.do
b/processor/all.do
index edd2b476138f004700d16d19f9734d8116c56136..5857254a2c72b56f801833bac0161861d81a15f4 100644
(file)
--- a/
processor/all.do
+++ b/
processor/all.do
@@
-1,24
+1,32
@@
#!/bin/sh
#!/bin/sh
+# Set up directories.
+metadata_dir=metadata
+public_dir=public
+cur_dir=$(pwd)
+mkdir -p "$public_dir"
+
# Remove target files for which no sources files can be found.
# Remove target files for which no sources files can be found.
-for file in *.intermediate; do
+for file in "$metadata_dir"/*.intermediate; do
+ basename=$(basename "$file")
if test -f "$file" &&
if test -f "$file" &&
- ! test -f "${
fil
e%.intermediate}.md" &&
- ! test -f "${
fil
e%.intermediate}.rst"; then
+ ! test -f "${
basenam
e%.intermediate}.md" &&
+ ! test -f "${
basenam
e%.intermediate}.rst"; then
rm "$file"
fi
done
rm "$file"
fi
done
-for file in *.uuid; do
+for file in "$metadata_dir"/*.uuid; do
+ basename=$(basename "$file")
if test -f "$file" &&
if test -f "$file" &&
- ! test -f "${
fil
e%.uuid}.md" &&
- ! test -f "${
fil
e%.uuid}.rst"; then
+ ! test -f "${
basenam
e%.uuid}.md" &&
+ ! test -f "${
basenam
e%.uuid}.rst"; then
rm "$file"
fi
done
for file in *.html; do
if test -f "$file" &&
! test "$file" = "index.html" &&
rm "$file"
fi
done
for file in *.html; do
if test -f "$file" &&
! test "$file" = "index.html" &&
- ! test -f "${file%.html}.intermediate"; then
+ ! test -f "${
metadata_dir}/${
file%.html}.intermediate"; then
rm "$file"
fi
done
rm "$file"
fi
done
@@
-27,15
+35,20
@@
done
# of the all.do script on them / build them if necessary.
for file in *.rst *.md; do
if test -f "$file"; then
# of the all.do script on them / build them if necessary.
for file in *.rst *.md; do
if test -f "$file"; then
- redo-ifchange "${file%.*}.intermediate"
+ redo-ifchange "${
metadata_dir}/${
file%.*}.intermediate"
fi
done
fi
done
-for file in *.intermediate; do
+for file in
"$metadata_dir"/
*.intermediate; do
if test -f "$file"; then
if test -f "$file"; then
- redo-ifchange "${file%.*}.html"
+ basename=$(basename "$file")
+ html_file=${basename%.intermediate}.html
+ redo-ifchange "$html_file"
+ ln -sf "$cur_dir/$html_file" "${public_dir}/"
fi
done
# Regenerate feed and index pages. Always.
fi
done
# Regenerate feed and index pages. Always.
-redo "feed.xml"
-redo "index.html"
+redo feed.xml
+ln -sf "$cur_dir"/feed.xml "${public_dir}/"
+redo index.html
+ln -sf "$cur_dir"/index.html "${public_dir}/"