Skip to content
Renaud Guillard edited this page Jun 3, 2013 · 6 revisions

build-shellscript

Shell script builder which use program interface XML definition file to automatically generate command line processing and help messages

Author
Renaud Guillard
Version
2.0

Usage

build-shellscript [-Spd] [--ns-xml-path <path> --ns-xml-path-relative] [-x <path>] -s <path> [(-i <...> | -I <...>)] [--force-interpreter] [--help] -o <path>

Global options

	ns-xml source path options
		--ns-xml-path: ns-xml source path
			Location of the ns folder of ns-xml package
		--ns-xml-path-relative: ns source path is relative this program path
	
	-x, --xml-description: Program description file
		If the program description file is provided, the xml file will be validated 
		before any XSLT processing
	-s, --shell: XML shell file
		A XML file following the bash XML schema
		The file may include a program interface XML definition
	-S, --skip-validation, --no-validation: Skip XML Schema validations
		The default behavior of the program is to validate the given xml-based 
		file(s) against its/their xml schema (http://xsd.nore.fr/program etc.). This 
		option will disable schema validations
	Default interpreter
		-i, --interpreter: Default shell interpreter type
			The interpreter family to use if the XSH file does not define one.
				Attention: This parameter is only available for XSH
												file using the
												XSH XML schema (http://xsd.nore.fr/xsh). The old
												http://xsd.nore.fr/bash XSD schema is not
												supported.
												
			The argument can be:	
				bash, zsh or ksh
		-I, --interpreter-cmd: Default shell interpreter invocation directive
			This value if used if the XSH file does not define one	
			The argument can be:	
				/usr/bin/env bash, /bin/bash, /usr/bin/env zsh or /bin/zsh
	
	--force-interpreter: 
		Force to use the interpreter defined by --interpreter or --interpreter-cmd
		This option has no meaning if none of --interpreter or --interpreter-cmd is 
		set
	-p, --prefix-sc-variables: Prefix subcommand options bound variable names
		This will prefix all subcommand options bound variable name by the 
		subcommand name (sc_varianbleNmae). This avoid variable name aliasing.
	-d, --debug: Generate debug messages in help and command line parsing functions
	--help: Display program usage
	-o, --output: Output file path

Copyright & Licensing

Copyright © 2011-2012 by Renaud Guillard (dev@nore.fr) Distributed under the terms of the MIT License, see LICENSE

Clone this wiki locally