Update command-line interface of centos-art.sh script.
- Previous to this commit, global configuration variables (like the
one used to specify the repository's working copy) were set inside
the centos-art.sh script, so to update their values it was required
to update the centos-art.sh script.
In this commit, all configuration variables were moved from
centos-art.sh script to centos-art.conf file. This movement
required to update centos-art.sh script to load the centos-art.conf
file.
- Previous to this commit, per-user configuration took place inside
the user's ~/.bash_profile file.
In this commit, per-user configuration takes place inside
~/.centos-art.conf file. Possible values to customize here include
TCAR_USER_EDITOR and TCAR_USER_WRKDIR. Other variables might be
added in the future.
- Previous to this commit, I didn't put my name in any .sh file.
In this commit, update the top comment adding my name, e-mail, and
gpg fingerprint before the copyright information which I'm giving
to The CentOS Project as long as this code be released under GPL
terms.
The e-mail information I publish in the scripts is local to my
workstation where I've installed and configured a mail server for
my friends to exchange information with me through the telephone
line and a wifi access point -Internet access isn't available for
most people in Cuba yet, so I feel motivated to provide alternative
ways of accessing the services I've installed and configured in my
own (CentOS) workstation.
The $Id$ string was removed from top comment.
- Previous to this commit, variable and function naming conventions
were not very well established. In this commit, start using the
following naming conventions:
* All variable's name definitions that have a global scope to
centos-art.sh script must begin with TCAR_. These variables
are generally defined in centos-art.conf file.
* All variable's name definitions that have a function-specific
scope to centos-art.sh script must begin with FNAME_. Where
FNAME is the name of the function the variable was defined for
first time. In case of nested function-specific environments,
the same model applies, using the deepest function name as
reference.
* All function's name definitions must begin with fname_. Where
fname is the name of the function. Nested function definitions
follow the same model using the last function name as
reference. In this configuration, two nested function
definitions at the same level cannot have the same name, so
you need to be sure they are named differently.
- Add function cli_printCaller to standardize the way caller
information is retrieved. You can now make use of --name, --path
and --line options to print caller information in whatever order
you wish.
- Previous to this commit, error messages triggered from
cli_printMessage function were redirected to standard output. In
this commit they are redirected to standard error output. This
includes output from options --as-error-line, --as-toknowmore-line,
--as-response-line, --as-notrailingnew-line and --as-stderr-line.
- Previous to this commit, we were using cli_parseArguments and
cli_parseArgumentsReDef to process command-line arguments through
getopt command. In this commit, these to functions were integrated
into cli_setArguments function. Both cli_parseArguments and
cli_parseArgumentsReDef functions were removed.
When parsing options, the cli_setArguments function defines the
name convention used by local variables inside different function
environments. See the top comment on cli_setArguments.sh file for
more information about the variable names you should use.
- All variables were enclosed in brackets.