From 39b4191f8f6bb43af1fd21dce438adf66d263fd1 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Wed, 1 Feb 2012 21:54:11 +0000 Subject: [PATCH] Script to make all man pages. --- CMake/allexec2man.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 CMake/allexec2man.sh diff --git a/CMake/allexec2man.sh b/CMake/allexec2man.sh new file mode 100755 index 0000000000..aab7c06ac1 --- /dev/null +++ b/CMake/allexec2man.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Convert all of the executables in this directory that are not tests to man +# pages in the given directory. +# +# Usage: +# allexec2man.sh /full/path/of/exec2man.sh output_directory/ +# +# For the executable 'cheese', the file 'cheese.1.gz' will be created in the +# output directory. +exec2man=$1 +outdir=$2 + +for program in `find . -perm /u=x,g=x,o=x | \ + grep -v '[.]$' | \ + grep -v '_test$' | \ + sed 's|^./||'`; do + echo "Generating man page for $program..."; + $1 $program $outdir/$program.1 + gzip $outdir/$program.1 +done