[mlpack-svn] r12210 - mlpack/trunk/CMake
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Apr 4 15:35:07 EDT 2012
Author: rcurtin
Date: 2012-04-04 15:35:07 -0400 (Wed, 04 Apr 2012)
New Revision: 12210
Modified:
mlpack/trunk/CMake/exec2man.sh
Log:
Clean up some man page warnings.
Modified: mlpack/trunk/CMake/exec2man.sh
===================================================================
--- mlpack/trunk/CMake/exec2man.sh 2012-04-04 19:34:11 UTC (rev 12209)
+++ mlpack/trunk/CMake/exec2man.sh 2012-04-04 19:35:07 UTC (rev 12210)
@@ -63,6 +63,8 @@
# The awk script is a little ugly, but it is meant to format parameters
# correctly so that the entire description of the parameter is on one line (this
# helps avoid 'man' warnings).
+# The sed line at the end removes accidental macros from the output, replacing
+# 'word' with "word".
./$name -h | \
sed 's/^For further information/Additional Information\n\n For further information/' | \
sed 's/^consult the documentation/ consult the documentation/' | \
@@ -73,5 +75,6 @@
sed 's/ / /g' | \
awk '/NAME/,/REQUIRED OPTIONS/ { print; } /ADDITIONAL INFORMATION/,0 { print; } /REQUIRED OPTIONS/,/ADDITIONAL INFORMATION/ { if (!/REQUIRED_OPTIONS/ && !/OPTIONS/ && !/ADDITIONAL INFORMATION/) { if (/ --/) { printf "\n" } sub(/^[ ]*/, ""); sub(/ [ ]*/, " "); printf "%s ", $0; } else { if (!/REQUIRED OPTIONS/ && !/ADDITIONAL INFORMATION/) { print "\n"$0; } } }' | \
sed 's/ ADDITIONAL INFORMATION/\n\nADDITIONAL INFORMATION/' | \
- txt2man -P mlpack -t $name -d 1 > $output
+ txt2man -P mlpack -t $name -d 1 | \
+ sed "s/^'\([A-Za-z0-9 ]*\)'/\"\1\"/" > $output
More information about the mlpack-svn
mailing list