2
0

makedocs.sh 448 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. topdir=$(pwd)
  3. [ -f "$topdir/build/makedocs.sh" -a -n "$1" ] || {
  4. echo "Please execute as ./build/makedocs.sh [output directory]" >&2
  5. exit 1
  6. }
  7. outdir=$(readlink -f "$1")
  8. mkdir -p "$outdir" || {
  9. echo "Unable to mkdir '$outdir'" >&2
  10. exit 1
  11. }
  12. (
  13. cd "$topdir/build/luadoc/"
  14. find "$topdir/libs/" "$topdir/modules/" -type f -name '*.lua' -or -name '*.luadoc' | \
  15. xargs grep -l '@return' | xargs ./doc.lua --no-files -d "$outdir"
  16. )