geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
663 B

  1. #!/bin/sh
  2. set -e
  3. # Written by Mikhail Gusarov
  4. #
  5. # Run syntax checks for all manpages in the documentation tree.
  6. #
  7. srcdir=${srcdir:-$PWD}
  8. dstdir=${builddir:-$PWD}
  9. mandir=${srcdir}/../docs
  10. #
  11. # Only test if suitable man is available
  12. #
  13. if ! man --help | grep -q warnings; then
  14. echo "man version not suitable, skipping tests"
  15. exit 0
  16. fi
  17. ec=0
  18. trap "rm -f $dstdir/man3" EXIT
  19. ln -sf "$mandir" "$dstdir/man3"
  20. for manpage in $mandir/libssh2_*.*; do
  21. echo "$manpage"
  22. warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$dstdir" --warnings \
  23. -E UTF-8 -l "$manpage" 2>&1 >/dev/null)
  24. if [ -n "$warnings" ]; then
  25. echo "$warnings"
  26. ec=1
  27. fi
  28. done
  29. exit $ec