USAGE for gen_script_man_pages.sh v1.7.0:

gen_script_man_pages.sh [<Script> [<Script2> ...]] [-rec | -submit] [-L <log>] [-d|-D]
or

gen_script_man_pages.sh [-h|-man|-V]


DESCRIPTION:
	This script generates man pages for SDP shell scripts. This is done by
	executing scripts with the '-man' argument for each script (or '-h'
	depending on the script). This helps ensure the latest in-code
	documentation from the scripts is included in the SDP Guide using
	an include directive in the AsciiDoc.

	It can also generate sample config files such as the install_sdp.cfg
	file that is generated by the install_sdp.sh script, so the sample
	config file can be referenced in the AsciiDoc file.

	This script generates docs in SDP doc/gen folder, where they are
	referenced in AsciiDoc (*.adoc) files.

	It can update files in version control (using 'p4 rec') if the '-rec'
       	option is used.  Alternately, if '-submit' is specified (which implies
	'-rec'), any files opened by reconcile are automatically submitted with
       	a description of 'Updated generated script man pages.'

	After this script is executed, the AsciiDoc can be updated by
	executing the following in the SDP 'doc' folder, the local folder
	corresponding to //guest/perforce_software/sdp/dev/doc:

	   make clean
	   make

OPTIONS:
 <Script> [<Script2> ...]
 	Specify a space-delimited list of scripts to generate docs for.  If no
	script is specified, man pages are generated for all configured scripts.

	Only the script basename, e.g. mkrep.sh or load_checkpoint.sh, should be
	given. This script knows where all documented scripts exist in the SDP
	structure, so the user need only specify the basename.

 -rec
	Specify '-rec' to reconcile of generated files.

 -s[ubmit]
	Specify '-s' (or '-submit') to submit any generated doc files with a
	changelist description of: 'Updated generate script man pages.'

	The '-submit' is ignored if associated script are checked out.

	The '-submit' option implies '-rec'.

	Files may submitted to:

	//guest/perforce_software/sdp/dev/doc/gen/...

 -L <log>
	Specify the path to a log file, or the special value 'off' to disable
	logging.  By default, all output (stdout and stderr) goes to
	/tmp/gen_script_man_page.<datestamp>.log

	NOTE: This script is self-logging.  That is, output displayed on the screen
	is simultaneously captured in the log file.  Do not run this script with
	redirection operators like '> log' or '2>&1', and do not use 'tee.'

 -d     Debug mode, generates more verbose output.

 -D     Set extreme debugging verbosity using bash 'set -x' mode. Implies '-d'.

HELP OPTIONS:
 -h	Display short help message
 -man	Display man-style help message
 -V	Dispay version info for this script and its libraries.

