DragonFly On-Line Manual Pages

Search: Section:  


shell-include(7)           Shell Include User Manual          shell-include(7)

NAME

shell-include - a system for handling include files for shells

OVERVIEW

Allows include files to be used in shells the same way they are with C. The file with the include code needs to be included. This is done by figuring out were it is located using which. . `which sh-include` will take care of it for sh. sh-include - bourne shell bash-include - bourne again shell

MAN PAGE NAMING

si is prefixed before include names. So for the include random, it become si-random. For any documentation on functions in a include, :: and the function name are postfixed to the name. So for shortRandom in random, it will be named si-random::shortRandom.

FILE STRUCTURE

The includes exist under %%PREFIX%%/libexec/shell-include/. There are then multiple dirs for include files for various shells. The directories then includes the stuff that will be included. The files and directories are expected to be readable by every one. Everything expects to be able to use %%PREFIX%%/man/ Some may expect %%PREFIX%%/bin to exist. %%PREFIX%% is /usr/local/ on most systems. If it or any of the other directories do not exist, they are created.

VARIABLES

With sh and possibly some other shells, variables in the functions are not isolated just to the function. Thus it is best to append the function name to the variable name for the purpose of avoiding variable collision.

BASE INCLUDES

random - includes some helper stuff for randomness fileGetline - includes a function for getting a specific line from a file

SEE ALSO

si-random(3), si-fileGetline(3)

TODO

Support examples dir. Clean up install. Create generic install creator.

AUTHOR

Copyright (c) 2007, Zane C. Bowers Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. written by Zane C. Bowers <vvelox@vvelox.net> 0.1.0 2009-10-04 shell-include(7)

Search: Section: