2015-01-28 21:27:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
topdir=$(pwd)
|
|
|
|
|
|
|
|
[ -f "$topdir/build/makedocs.sh" -a -n "$1" ] || {
|
|
|
|
echo "Please execute as ./build/makedocs.sh [output directory]" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2015-09-02 07:38:28 +00:00
|
|
|
outdir=$(readlink -f "$1")
|
|
|
|
|
|
|
|
mkdir -p "$outdir" || {
|
|
|
|
echo "Unable to mkdir '$outdir'" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2015-01-28 21:27:46 +00:00
|
|
|
(
|
|
|
|
cd "$topdir/build/luadoc/"
|
|
|
|
find "$topdir/libs/" "$topdir/modules/" -type f -name '*.lua' -or -name '*.luadoc' | \
|
2015-09-02 07:38:28 +00:00
|
|
|
xargs grep -l '@return' | xargs ./doc.lua --no-files -d "$outdir"
|
2015-01-28 21:27:46 +00:00
|
|
|
)
|