File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed
Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,36 @@ while IFS= read -r f; do
4040 echo " ${n} -> $( du -b " ${html} " | cut -f1) bytes"
4141done < <( find src/main/resources/org/eolang/motives -name ' *.md' )
4242
43- (
44- printf ' <html><body style="font-family: monospace;">\n'
45- printf ' <p>Latest version: %s</p>\n' " ${tag} "
46- printf ' <p>List of lints in this version<p>'
43+ function list_them() {
4744 printf " <ul>\n"
4845 while IFS= read -r f; do
4946 n=$( basename " ${f} " " .html" )
5047 printf ' <li><a href="%s">%s</a></li>\n' \
5148 " /lints/${tag} /${n} .html" " ${n} "
5249 done < <( find " gh-pages/${tag} " -name ' *.html' | sort)
5350 printf ' </ul>\n'
51+ }
52+
53+ function head() {
54+ printf ' <html><body style="font-family: monospace;">\n'
55+ }
56+
57+ function tail() {
5458 printf ' <p>Published on %s.</p>\n' " $( date) "
5559 printf ' </body></html>'
60+ }
61+
62+ (
63+ head
64+ printf ' <p>Latest version: <a href="/lints/%s/index.html">%s</a></p>\n' " ${tag} " " ${tag} "
65+ printf ' <p>List of lints in this version:<p>'
66+ list_them
67+ tail
5668) > " gh-pages/index.html"
69+
70+ (
71+ head
72+ printf " <p>List of lints in %s:<p>" " ${tag} "
73+ list_them
74+ tail
75+ ) > " gh-pages/${tag} /index.html"
You can’t perform that action at this time.
0 commit comments