From 93dfb6f7d67e362098482853f794220e0ad3af77 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 16 Feb 2013 13:35:30 -0800 Subject: [PATCH] Teach build_documentation.sh to not generate the test man page on any platform, or the open man page on OS X. The system man pages are better. --- build_tools/build_documentation.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build_tools/build_documentation.sh b/build_tools/build_documentation.sh index 1d0356851..2d971ec2a 100755 --- a/build_tools/build_documentation.sh +++ b/build_tools/build_documentation.sh @@ -19,6 +19,15 @@ else exit 1 fi +# Determine which man pages we don't want to generate. +# Don't make a test man page. fish's test is conforming, so the system man pages +# are applicable and generally better. +# on OS X, don't make a man page for open, since we defeat fish's open function on OS X. +CONDEMNED_PAGES=test.1 +if test `uname` = 'Darwin'; then + CONDEMNED_PAGES="$CONDEMNED_PAGES open.1" +fi + # Helper function to turn a relative path into an absolute path resolve_path() { @@ -35,6 +44,7 @@ OUTPUTDIR=`resolve_path "$OUTPUTDIR"` echo " doxygen file: $DOXYFILE" echo " input directory: $INPUTDIR" echo " output directory: $OUTPUTDIR" +echo " skipping: $CONDEMNED_PAGES" # Make sure INPUTDIR is found if test ! -d "$INPUTDIR"; then @@ -99,6 +109,7 @@ RESULT=$? cd "${OUTPUTDIR}/man/man1/" if test "$RESULT" = 0 ; then + # Postprocess the files for i in "$INPUTDIR"/*.txt; do # It would be nice to use -i here for edit in place, but that is not portable @@ -106,6 +117,10 @@ if test "$RESULT" = 0 ; then sed -e "s/\(.\)\\.SH/\1/" -e "s/$CMD_NAME *\\\\- *\"\(.*\)\"/\1/" "${CMD_NAME}.1" > "${CMD_NAME}.1.tmp" mv "${CMD_NAME}.1.tmp" "${CMD_NAME}.1" done + + # Erase condemned pages + rm -f $CONDEMNED_PAGES + fi # Destroy TMPLOC