[mlpack-svn] r11633 - mlpack/trunk/CMake
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Feb 28 13:31:46 EST 2012
Author: rcurtin
Date: 2012-02-28 13:31:46 -0500 (Tue, 28 Feb 2012)
New Revision: 11633
Modified:
mlpack/trunk/CMake/exec2man.sh
Log:
Slight change because CLI outputs differently now.
Modified: mlpack/trunk/CMake/exec2man.sh
===================================================================
--- mlpack/trunk/CMake/exec2man.sh 2012-02-28 17:37:27 UTC (rev 11632)
+++ mlpack/trunk/CMake/exec2man.sh 2012-02-28 18:31:46 UTC (rev 11633)
@@ -31,7 +31,7 @@
# Then, regular options.
options=`./$name -h | \
- awk '/Options:/,0' | \
+ awk '/Options:/,/For further information,/' | \
grep '^ --' | \
sed 's/^ --/--/' | \
grep -v -- '--help' | \
@@ -64,10 +64,14 @@
# correctly so that the entire description of the parameter is on one line (this
# helps avoid 'man' warnings).
./$name -h | \
+ sed 's/^For further information/Additional Information\n\n For further information/' | \
+ sed 's/^consult the documentation/ consult the documentation/' | \
+ sed 's/^distribution of MLPACK./ distribution of MLPACK./' | \
awk -v syn="$synopsis" \
'{ if (NR == 1) print "NAME\n '$name' - "tolower($0)"\nSYNOPSIS\n "syn" \nDESCRIPTION\n" ; else print } ' | \
sed '/^[^ ]/ y/qwertyuiopasdfghjklzxcvbnm:/QWERTYUIOPASDFGHJKLZXCVBNM /' | \
sed 's/ / /g' | \
- awk '/NAME/,/REQUIRED OPTIONS/ { print; } /REQUIRED OPTIONS/,0 { if (!/REQUIRED_OPTIONS/ && !/OPTIONS/) { if (/ --/) { printf "\n" } sub(/^[ ]*/, ""); sub(/ [ ]*/, " "); printf "%s ", $0; } else { if (!/REQUIRED OPTIONS/) { print "\n"$0; } } }' | \
+ 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
More information about the mlpack-svn
mailing list