2018-10-02 00:53:05 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
cd "$@"/docs/
|
|
|
|
(
|
2018-10-23 07:29:28 -07:00
|
|
|
echo -e "# systemd Documentation\n"
|
2018-10-02 00:53:05 -07:00
|
|
|
|
|
|
|
for f in *.md ; do
|
|
|
|
if [ "x$f" != "xindex.md" ] ; then
|
|
|
|
t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'`
|
2018-10-23 07:29:28 -07:00
|
|
|
u="https://systemd.io/"`echo "$f" | sed -e 's/.md$//'`
|
|
|
|
echo "* [$t]($u)"
|
2018-10-02 00:53:05 -07:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
) > index.md
|