41 lines
787 B
Bash
41 lines
787 B
Bash
# -*- sh -*-
|
|
|
|
# configuration things
|
|
: ${ROOT:=.} # change when publishing
|
|
|
|
# symbols (?)
|
|
PHI="<span class=phi>ⱷ</span>"
|
|
|
|
# functions
|
|
P()(echo "$@")
|
|
T()(sed q "$1")
|
|
|
|
Nav() { # Nav <INDEX> <files...>
|
|
idx="$1";shift
|
|
if [ "x$idx" != "x-" ]; then
|
|
echo "<a href=\"$ROOT/index.html\""
|
|
[ "$idx" = "$F" ] && echo "class=current"
|
|
echo ">acdw</a>"
|
|
fi
|
|
echo "${PHI}"
|
|
for post; do
|
|
if [ "$post" != "$idx" ]; then
|
|
echo "<a href=\"$ROOT/${post#*/}\""
|
|
[ "$post" = "$F" ] && echo "class=current"
|
|
echo ">$(T "$post")</a>"
|
|
fi
|
|
done
|
|
}
|
|
|
|
X()(eval "$(P "cat<<.";cat;P;P .)")
|
|
|
|
. hell/hell
|
|
|
|
# MAIN
|
|
set +C # it's clobberin' time!!!
|
|
[ $DEBUG ] && set -x # debug if DEBUG is set
|
|
for F
|
|
do
|
|
X<L>O/${F#I}
|
|
done
|