summaryrefslogtreecommitdiff
path: root/mkdeps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mkdeps.sh')
-rwxr-xr-xmkdeps.sh35
1 files changed, 18 insertions, 17 deletions
diff --git a/mkdeps.sh b/mkdeps.sh
index bc7dc25..69424ad 100755
--- a/mkdeps.sh
+++ b/mkdeps.sh
@@ -9,23 +9,23 @@ normalize() {
}
pages() {
- find src/pages/*/*.adoc -type f | normalize
+ find src/pages/*/*.adoc -type f | normalize
}
articles() {
- find src/collections/*/*/*/ -type f -name '*.adoc' | normalize
+ find src/collections/*/*/*/ -type f -name '*.adoc' | normalize
}
slides() {
- find src/slides/*/*/ -type f -name '*.adoc' | normalize
+ find src/slides/*/*/ -type f -name '*.adoc' | normalize
}
indexes() {
- find src/collections/*/*/index.adoc | normalize
+ find src/collections/*/*/index.adoc | normalize
}
categories() {
- find src/collections/*/*/categories.name | normalize
+ grep -l '^:type: categories$' src/collections/*/*/*.adoc | normalize
}
media() {
@@ -81,7 +81,6 @@ cat po/po4a.cfg |
files | sed 's/^\(.*\)\.adoc$/\1.html/'
files | sed 's/^\(.*\)\.adoc$/\1.snippets/'
slides | sed 's/^\(.*\)\.adoc$/\1.pdf/'
- indexes | sed 's|^\(.*\)/index\.adoc$|\1/categories.xml|'
indexes | sed 's|^\(.*\)/index\.adoc$|\1/feed.xml|'
} | sed 's/^\(.*\)$/\1.gz:\t\1/'
printf '\n'
@@ -120,6 +119,7 @@ collectionentries() {
colllink="$2"
lang="$(basename "$langlink")"
c="$(printf '%s' "$colllink" | normalize)"
+ plural="$(cat src/names/categories/"$lang".txt)"
printf '\n\n'
name="$(basename "$c")"
@@ -130,35 +130,36 @@ collectionentries() {
echo "$art.$name.feedentry = \$($art.$name.adoc:.adoc=.feedentry)"
echo "$art.$name.categorydata = \$($art.$name.adoc:.adoc=.categorydata)"
-
printf '%s/sortdata.txt:\tdeps.mk\n' "$c"
printf '\tprintf %s $(%s.%s.sortdata) > $@\n\n' "'%s\n'" "$art" "$name"
- listings='
+ listings="
feed.xml
index.htmllisting
- categories.htmllisting
- categories.txt
- '
+ $plural.htmllisting
+ $plural.txt
+ "
for lst in $listings; do
printf '%s/%s:\t%s/sortdata.txt\n' "$c" "$lst" "$c"
printf '%s/%s:\t$(%s.%s.sortdata)\n' "$c" "$lst" "$art" "$name"
done
printf '%s/index.htmllisting\t' "$c"
- printf '%s/categories.htmllisting:\t' "$c"
+ printf '%s/%s.htmllisting:\t' "$c" "$plural"
printf '$(%s.%s.indexentry)\n' "$art" "$name"
- printf '%s/categories.txt:\t' "$c"
+ printf '%s/%s.txt:\t' "$c" "$plural"
printf '$(%s.%s.categorydata)\n' "$art" "$name"
- printf '%s/categories.txt\t' "$c"
+ printf '%s/%s.txt\t' "$c" "$plural"
printf '%s/feed.xml:\t' "$c"
printf '$(%s.%s.feedentry)\n' "$art" "$name"
- printf '%s/categories.htmllisting\t' "$c"
- printf '%s/categories.xml:\t' "$c"
- printf '%s/categories.txt\n' "$c"
+ printf '%s/%s.htmllisting\t' "$c" "$plural"
+ printf '%s/%s.xml:\t' "$c" "$plural"
+ printf '%s/%s.txt\n' "$c" "$plural"
+
+ printf '%s/%s.xml.gz:\t%s/%s.xml\n' "$c" "$plural" "$c" "$plural"
}