Systemd/tools/make-index-md.sh
Lennart Poettering 0bc7a22d93 docs: add a simple, auto-generated index.md
This is useful for the github pages feature
2018-10-02 10:43:54 +02:00

16 lines
323 B
Bash
Executable file

#!/bin/sh
set -eu
cd "$@"/docs/
(
echo "# systemd Documentation"
for f in *.md ; do
if [ "x$f" != "xindex.md" ] ; then
t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'`
echo -e "\n* [$t]($f)"
fi
done
) > index.md