2023-04-21 19:35:54 +02:00
|
|
|
#!/bin/sh
|
2023-06-03 15:19:29 +02:00
|
|
|
# generate-code-docs.sh
|
|
|
|
# Generate code documentation from code-docs.md
|
|
|
|
#
|
|
|
|
# See LICENSE file for copyright and license details.
|
2023-05-08 12:08:59 +02:00
|
|
|
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
2023-04-21 19:35:54 +02:00
|
|
|
[ ! -f "$1" ] && printf "You must specify an input file.\n" && exit 1
|
|
|
|
[ -z "$2" ] && printf "You must specify an output file.\n" && exit 1
|
2023-05-08 12:08:59 +02:00
|
|
|
pandoc -f markdown -t html5 --metadata title="spmenu documentation ${version}" -s --toc -o "$2" "$1" || exit 1
|
2023-04-21 19:35:54 +02:00
|
|
|
exit 0
|