1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
systemd/tools/make-index-md.sh
2018-11-16 17:44:27 +01:00

17 lines
402 B
Bash
Executable File

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